<?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: ArcGIS Python API Sample Notebook &amp;quot;Using Geoprocessing tools&amp;quot; does not work in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765248#M522</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heard back from Esri, the function is supposed to have 4 parameters, so one can just comment out the three parameter definition and uncomment the other one until Esri changes the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Aug 2016 14:18:02 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2016-08-13T14:18:02Z</dc:date>
    <item>
      <title>ArcGIS Python API Sample Notebook "Using Geoprocessing tools" does not work</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765244#M518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm following along with this sample notebook but the following input doesn't seem to produce any output on the map when I click on the map:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="k" style="color: #008000; font-weight: bold;"&gt;def&lt;/SPAN&gt; &lt;SPAN class="nf" style="color: #0000ff;"&gt;do_analysis&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;m&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;g&lt;/SPAN&gt;&lt;SPAN class="p"&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="n"&gt;ret&lt;/SPAN&gt; &lt;SPAN class="o" style="color: #666666;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="n"&gt;gptool&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #666666;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;message_in_a_bottle&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;g&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="mi" style="color: #666666;"&gt;150&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="k" style="color: #008000; font-weight: bold;"&gt;for&lt;/SPAN&gt; &lt;SPAN class="n"&gt;geom&lt;/SPAN&gt; &lt;SPAN class="ow" style="color: #aa22ff; font-weight: bold;"&gt;in&lt;/SPAN&gt; &lt;SPAN class="n"&gt;ret&lt;/SPAN&gt;&lt;SPAN class="p"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="nb" style="color: #008000;"&gt;map&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #666666;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;draw&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;geom&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="nb" style="color: #008000;"&gt;map&lt;/SPAN&gt;&lt;SPAN class="o" style="color: #666666;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;on_click&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;do_analysis&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gptool object is returning a 'NoneType':&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="ansired" style="color: darkred;"&gt;TypeError&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; Traceback (most recent call last) 
&lt;/SPAN&gt;&lt;SPAN class="ansigreen" style="color: darkgreen;"&gt;&amp;lt;ipython-input-24-a0a0d2de3044&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; in &lt;/SPAN&gt;&lt;SPAN class="ansicyan"&gt;&lt;SPAN style="color: #4682b4;"&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="ansiblue" style="color: darkblue;"&gt;()&lt;/SPAN&gt;&lt;SPAN style="color: #4682b4;"&gt; &lt;/SPAN&gt;&lt;SPAN class="ansigreen" style="color: darkgreen;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
1&lt;/SPAN&gt;&lt;SPAN style="color: #4682b4;"&gt; ret &lt;/SPAN&gt;&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4682b4;"&gt; gptool&lt;/SPAN&gt;&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4682b4;"&gt;message_in_a_bottle&lt;/SPAN&gt;&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #4682b4;"&gt;g&lt;/SPAN&gt;&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="ansicyan" style="color: steelblue;"&gt;150&lt;/SPAN&gt;&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #4682b4;"&gt; 
&lt;/SPAN&gt;&lt;SPAN class="ansigreen" style="color: darkgreen;"&gt;----&amp;gt; 2&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt; &lt;SPAN class="ansigreen" style="color: darkgreen;"&gt;for&lt;/SPAN&gt; geom &lt;SPAN class="ansigreen" style="color: darkgreen;"&gt;in&lt;/SPAN&gt; ret&lt;SPAN class="ansiyellow"&gt;:&lt;/SPAN&gt;&lt;SPAN class="ansiyellow"&gt;&lt;/SPAN&gt; &lt;SPAN class="ansigreen" style="color: darkgreen;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
3&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map&lt;SPAN class="ansiyellow"&gt;.&lt;/SPAN&gt;draw&lt;SPAN class="ansiyellow"&gt;(&lt;/SPAN&gt;geom&lt;SPAN class="ansiyellow"&gt;)&lt;/SPAN&gt;&lt;SPAN class="ansiyellow"&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="ansired" style="color: darkred;"&gt;TypeError&lt;/SPAN&gt;: 'NoneType' object is not iterable &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="ansicyan" style="color: steelblue;"&gt;&lt;SPAN class="ansigreen" style="color: darkgreen;"&gt;&lt;SPAN class="ansiyellow" style="color: #c4a000;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p"&gt;Any insight would be helpful (I'm&amp;nbsp; a newbie to this API)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p"&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:29:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765244#M518</guid>
      <dc:creator>MattEnglish</dc:creator>
      <dc:date>2021-12-12T08:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Sample Notebook "Using Geoprocessing tools" does not work</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765245#M519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Providing a link to the sample notebook would be most helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have some indentation issues, but I am guessing those are copy &amp;amp; paste artifacts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your error message is informing you that your geoprocessing tool returned nothing.&amp;nbsp; When you iterate over the list with a single None object, it generates an error when you try to draw it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 17:40:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765245#M519</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-08-11T17:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Sample Notebook "Using Geoprocessing tools" does not work</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765246#M520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try running this notebook and see if you can reproduce the problem - I'm following exactly as it's laid out in the sample:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/sample-notebooks/Using-Geoprocessing-tools/"&gt;https://developers.arcgis.com/python/sample-notebooks/Using-Geoprocessing-tools/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 20:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765246#M520</guid>
      <dc:creator>MattEnglish</dc:creator>
      <dc:date>2016-08-11T20:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Sample Notebook "Using Geoprocessing tools" does not work</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765247#M521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get an error at the very end, but different than your error when I click on the map in various locations:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="ansired"&gt;TypeError&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Traceback (most recent call last)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="ansired"&gt;TypeError&lt;/SPAN&gt;: _handle_map_msg() takes 3 positional arguments but 4 were given&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;I just downloaded the sample/example Jupyter notebook from Github, and it generates the same error as when I manually type in the code.&amp;nbsp; I will have to dig in a bit deeper.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;:&amp;nbsp; I found the cause of the error for me, lines 327-329 of viz.py look like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def _handle_map_msg(self, _, content):
#def _handle_map_msg(self, _, content, buffers):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; """Handle a msg from the front-end.&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code calling &lt;SPAN style="font-family: courier new,courier;"&gt;_handle_map_msg()&lt;/SPAN&gt; is passing 4 arguments instead of 3.&amp;nbsp; I will have to ask in the beta forums if the function definition is wrong or code calling it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:29:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765247#M521</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T08:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Python API Sample Notebook "Using Geoprocessing tools" does not work</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765248#M522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heard back from Esri, the function is supposed to have 4 parameters, so one can just comment out the three parameter definition and uncomment the other one until Esri changes the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Aug 2016 14:18:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-python-api-sample-notebook-quot-using/m-p/765248#M522</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-08-13T14:18:02Z</dc:date>
    </item>
  </channel>
</rss>

