Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I was attempting to run Setup_Customers_Using_Tabular_Data , I modified the paths to fit my environment but when I run the program I receive

SetupCustomersByTable() takes no arguments (6 given)

note: I had to modify the exception clause to output this

A little investigation in IDLE showed this:

IDLE 2.6.5      
>>> import arcview
>>> import arcpy
>>> print hasattr(arcpy.ba, 'SetupCustomersByTable')

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    print hasattr(arcpy.ba, 'SetupCustomersByTable')
AttributeError: 'module' object has no attribute 'ba'
>>> print hasattr(arcpy, 'ba')
False
>>> arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")

<module 'ba' (built-in)>
>>> print hasattr(arcpy, 'ba')
True
>>> print hasattr(arcpy.ba, 'SetupCustomersByTable')
True
>>> import inspect
>>> print(inspect.getargspec(arcpy.ba.SetupCustomersByTable))
ArgSpec(args=[], varargs=None, keywords=None, defaults=None)

This is not the only function this happens with, but all of them in the BA package.

I've never gotten any full arcpy tutorial to work from the website, am I missing something obvious setup wise?

share|improve this question
1  
If the example on the help pages doesn't work as is I would file a ticket with Esri tech support. I've encountered bugs in their sample code on occasion. They're usually pretty quick to respond and clean it up. –  matt wilkie Sep 28 '11 at 17:07
    
@mattwilkie I've already done that, and posted to their public forum. This is my third plea to a community. I'm still working through it myself though. –  TCopple Sep 28 '11 at 20:02
    
sorry to hear about lack of response. I don't have BA so can't run any tests myself. Good luck! –  matt wilkie Sep 28 '11 at 20:17
add comment

1 Answer 1

up vote 2 down vote accepted

Answering my own here. A second call into the ESRI support desk and they had me open up the ArcMAP application, to this point I had only opened the Buisness Analyst application after I installed the product.

The support professional explained that the first running of ArcMap initializes some global state. They were unaware of exactly what that state was, but it appears to have worked. All arcpy BA functions now operate as expected.

share|improve this answer
    
thanks for coming back to post follow up! –  matt wilkie Oct 3 '11 at 18:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.