jtcopple

Takes no arguments error.

Discussion created by jtcopple on Sep 27, 2011
Latest reply on Oct 3, 2011 by jtcopple
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?

Tyler

Outcomes