<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Method from imported toolbox throwing &amp;amp;quot;takes 0 arguments (2 given)&amp;amp;quot; in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/method-from-imported-toolbox-throwing-amp-quot/m-p/460926#M36105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm importing a toolbox into my Python script using arcpy.ImportToolbox(..).&amp;nbsp; When I call one (or any) of the method(s) from that toolbox, I get the error message "takes 0 arguments ...".&amp;nbsp; I'm using the toolbox alias, when calling the method.&amp;nbsp; Also, I've opened the method in ArcMap and verified there are 2 parameters.&amp;nbsp; What could be wrong? (fyi...my first time doing this...somewhat new to arcpy)&amp;nbsp; {ArcGIS 10, Python 2.6}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is what I've tried in my Python console.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ImportToolbox(r"mypath/mytoolbox.tbx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.tbMethod_tbAliasName("parm1","parm2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "&amp;lt;console&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeError: tbMethod() takes no arguments (2 given)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2012 15:38:40 GMT</pubDate>
    <dc:creator>RuthLeBlanc</dc:creator>
    <dc:date>2012-03-19T15:38:40Z</dc:date>
    <item>
      <title>Method from imported toolbox throwing &amp;quot;takes 0 arguments (2 given)&amp;quot;</title>
      <link>https://community.esri.com/t5/python-questions/method-from-imported-toolbox-throwing-amp-quot/m-p/460926#M36105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm importing a toolbox into my Python script using arcpy.ImportToolbox(..).&amp;nbsp; When I call one (or any) of the method(s) from that toolbox, I get the error message "takes 0 arguments ...".&amp;nbsp; I'm using the toolbox alias, when calling the method.&amp;nbsp; Also, I've opened the method in ArcMap and verified there are 2 parameters.&amp;nbsp; What could be wrong? (fyi...my first time doing this...somewhat new to arcpy)&amp;nbsp; {ArcGIS 10, Python 2.6}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is what I've tried in my Python console.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ImportToolbox(r"mypath/mytoolbox.tbx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.tbMethod_tbAliasName("parm1","parm2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "&amp;lt;console&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeError: tbMethod() takes no arguments (2 given)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2012 15:38:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/method-from-imported-toolbox-throwing-amp-quot/m-p/460926#M36105</guid>
      <dc:creator>RuthLeBlanc</dc:creator>
      <dc:date>2012-03-19T15:38:40Z</dc:date>
    </item>
  </channel>
</rss>

