<?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 Re: Takes no arguments error. in ArcGIS Solutions Questions</title>
    <link>https://community.esri.com/t5/arcgis-solutions-questions/takes-no-arguments-error/m-p/88094#M111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've managed to solve the problem simple by opening ArcMap.&amp;nbsp; I hadn't tried to use the software since a re-install and opening ArcMap must have initialized some global state because the method signatures were found the next time I called them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I have moved onto another issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//00mm0000001p000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//00mm0000001p000000.htm&lt;/A&gt;&lt;SPAN&gt; The parameter list in the example and the syntax list do NOT match, which is extremely misleading.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second: Neither of those seem to be exactly as it's listed in Arcpy using reflection&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IDLE 2.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt; import arcview;
&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; arcpy.ImportToolbox("d:\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
&amp;lt;module 'ba' (built-in)&amp;gt;
&amp;gt;&amp;gt;&amp;gt; import inspect
&amp;gt;&amp;gt;&amp;gt; print(inspect.getargspec(arcpy.ba.LocatorReport))
ArgSpec(args=['InputFeatureLayer', 'IDField', 'NameFldName', 'BusinessLayer', 'FieldsToAppear', 'IsLandscape', 'All_Or_Single_Or_Selected', 'ByID_Or_ByName', 'Single_Site', 'WayToSelectBusiness', 'RadiusToSelectBusinesses', 'NumberOfBusinessesToSelect', 'DistanceCalculateMethod', 'AddDistanceToBusiness', 'WayToDefineDistanceField', 'DesireLinesDistanceField', 'NeedReportOutput', 'ReportTitle', 'ReportDir', 'NeedFeatureclassOutput', 'OutputFeatureClass', 'BarrierFeatureClasses', 'ReportFormats'], varargs=None, keywords=None, defaults=(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:21:56 GMT</pubDate>
    <dc:creator>TylerCopple</dc:creator>
    <dc:date>2021-12-10T23:21:56Z</dc:date>
    <item>
      <title>Takes no arguments error.</title>
      <link>https://community.esri.com/t5/arcgis-solutions-questions/takes-no-arguments-error/m-p/88092#M109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was attempting to run &lt;/SPAN&gt;&lt;A href="http://bit.ly/oQLY0V" rel="nofollow noopener noreferrer" target="_blank"&gt;Setup_Customers_Using_Tabular_Data &lt;/A&gt;&lt;SPAN&gt;, I modified the paths to fit my environment but when I run the program I receive &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SetupCustomersByTable() takes no arguments (6 given)&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;*note* I had to modify the exception clause to output this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A little investigation in IDLE showed this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IDLE 2.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt; import arcview
&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy.ba, 'SetupCustomersByTable')

Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;pyshell#2&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print hasattr(arcpy.ba, 'SetupCustomersByTable')
AttributeError: 'module' object has no attribute 'ba'
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy, 'ba')
False
&amp;gt;&amp;gt;&amp;gt; arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")

&amp;lt;module 'ba' (built-in)&amp;gt;
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy, 'ba')
True
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy.ba, 'SetupCustomersByTable')
True
&amp;gt;&amp;gt;&amp;gt; import inspect
&lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;&amp;gt;&amp;gt;&amp;gt; print(inspect.getargspec(arcpy.ba.SetupCustomersByTable))
ArgSpec(args=[], varargs=None, keywords=None, defaults=None&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tyler&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:21:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-solutions-questions/takes-no-arguments-error/m-p/88092#M109</guid>
      <dc:creator>TylerCopple</dc:creator>
      <dc:date>2021-12-10T23:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Takes no arguments error.</title>
      <link>https://community.esri.com/t5/arcgis-solutions-questions/takes-no-arguments-error/m-p/88093#M110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I was attempting to run&amp;nbsp;&amp;nbsp; &lt;A href="http://bit.ly/oQLY0V" rel="nofollow noopener noreferrer" target="_blank"&gt;Setup_Customers_Using_Tabular_Data &lt;/A&gt;, I modified the paths to fit my environment but when I run the program I receive&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;PRE class="lia-code-sample line-numbers language-none"&gt;SetupCustomersByTable() takes no arguments (6 given)&lt;/PRE&gt; &lt;BR /&gt; &lt;SPAN style="font-style:italic;"&gt;*note* I had to modify the exception clause to output this&lt;/SPAN&gt; &lt;BR /&gt; &lt;BR /&gt;A little investigation in IDLE showed this:&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IDLE 2.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt; import arcview
&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy.ba, 'SetupCustomersByTable')

Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;pyshell#2&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print hasattr(arcpy.ba, 'SetupCustomersByTable')
AttributeError: 'module' object has no attribute 'ba'
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy, 'ba')
False
&amp;gt;&amp;gt;&amp;gt; arcpy.ImportToolbox("C:\Program Files (x86)\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")

&amp;lt;module 'ba' (built-in)&amp;gt;
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy, 'ba')
True
&amp;gt;&amp;gt;&amp;gt; print hasattr(arcpy.ba, 'SetupCustomersByTable')
True
&amp;gt;&amp;gt;&amp;gt; import inspect
&lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;&amp;gt;&amp;gt;&amp;gt; print(inspect.getargspec(arcpy.ba.SetupCustomersByTable))
ArgSpec(args=[], varargs=None, keywords=None, defaults=None&lt;/SPAN&gt;)&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;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?&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;Tyler&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tyler,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you could attach your script we can certainly take a look at it and see if we can diagnose the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:21:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-solutions-questions/takes-no-arguments-error/m-p/88093#M110</guid>
      <dc:creator>Jason_RobinsonRobinson</dc:creator>
      <dc:date>2021-12-10T23:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Takes no arguments error.</title>
      <link>https://community.esri.com/t5/arcgis-solutions-questions/takes-no-arguments-error/m-p/88094#M111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've managed to solve the problem simple by opening ArcMap.&amp;nbsp; I hadn't tried to use the software since a re-install and opening ArcMap must have initialized some global state because the method signatures were found the next time I called them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I have moved onto another issue. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//00mm0000001p000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/de/arcgisdesktop/10.0/help/index.html#//00mm0000001p000000.htm&lt;/A&gt;&lt;SPAN&gt; The parameter list in the example and the syntax list do NOT match, which is extremely misleading.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second: Neither of those seem to be exactly as it's listed in Arcpy using reflection&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IDLE 2.6.5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt; import arcview;
&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; arcpy.ImportToolbox("d:\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Business Analyst Tools.tbx")
&amp;lt;module 'ba' (built-in)&amp;gt;
&amp;gt;&amp;gt;&amp;gt; import inspect
&amp;gt;&amp;gt;&amp;gt; print(inspect.getargspec(arcpy.ba.LocatorReport))
ArgSpec(args=['InputFeatureLayer', 'IDField', 'NameFldName', 'BusinessLayer', 'FieldsToAppear', 'IsLandscape', 'All_Or_Single_Or_Selected', 'ByID_Or_ByName', 'Single_Site', 'WayToSelectBusiness', 'RadiusToSelectBusinesses', 'NumberOfBusinessesToSelect', 'DistanceCalculateMethod', 'AddDistanceToBusiness', 'WayToDefineDistanceField', 'DesireLinesDistanceField', 'NeedReportOutput', 'ReportTitle', 'ReportDir', 'NeedFeatureclassOutput', 'OutputFeatureClass', 'BarrierFeatureClasses', 'ReportFormats'], varargs=None, keywords=None, defaults=(None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:21:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-solutions-questions/takes-no-arguments-error/m-p/88094#M111</guid>
      <dc:creator>TylerCopple</dc:creator>
      <dc:date>2021-12-10T23:21:56Z</dc:date>
    </item>
  </channel>
</rss>

