Method from imported toolbox throwing "takes 0 arguments (2 given)"

351
0
03-19-2012 08:38 AM
RuthLeBlanc
New Contributor
I'm importing a toolbox into my Python script using arcpy.ImportToolbox(..).  When I call one (or any) of the method(s) from that toolbox, I get the error message "takes 0 arguments ...".  I'm using the toolbox alias, when calling the method.  Also, I've opened the method in ArcMap and verified there are 2 parameters.  What could be wrong? (fyi...my first time doing this...somewhat new to arcpy)  {ArcGIS 10, Python 2.6}
Below is what I've tried in my Python console.  Thanks!

import arcpy
arcpy.ImportToolbox(r"mypath/mytoolbox.tbx")
arcpy.tbMethod_tbAliasName("parm1","parm2")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
TypeError: tbMethod() takes no arguments (2 given)
Tags (2)
0 Kudos
0 Replies