<?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: Python script fails to run a model in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264838#M9106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abdallah,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Your model uses&amp;nbsp;field calculator&amp;nbsp;&amp;nbsp;&amp;nbsp;to populate some fields, right?&amp;nbsp;&lt;/P&gt;&lt;P&gt;in that case try to change the expression type in the field calculator&amp;nbsp; from VB to Python and it will work with you.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="413701" class="image-1 jive-image" height="255" src="https://community.esri.com/legacyfs/online/413701_pastedImage_1.png" width="308" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jul 2018 16:00:25 GMT</pubDate>
    <dc:creator>AhmadSALEH1</dc:creator>
    <dc:date>2018-07-10T16:00:25Z</dc:date>
    <item>
      <title>Python script fails to run a model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264834#M9102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am Trying to run a model by using python script, but an error occurs while running the model by python script despite the fact that the model working fine when I running it directly from ArcMap.&lt;/P&gt;&lt;P&gt;Please see the screenshots below&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/395447_Error.png" style="width: 620px; height: 388px;" /&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/395448_SS1.png" style="width: 620px; height: 388px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;what&lt;/SPAN&gt; &lt;SPAN class=""&gt;might&lt;/SPAN&gt; be the issue here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 09:36:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264834#M9102</guid>
      <dc:creator>abdullahqasrawi</dc:creator>
      <dc:date>2018-02-01T09:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Python script fails to run a model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264835#M9103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are there any values for the parameters? the first one says it doesn't exist?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 10:04:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264835#M9103</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-01T10:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Python script fails to run a model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264836#M9104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-userid="3116" data-username="Dan_Patterson" href="https://community.esri.com/people/Dan_Patterson"&gt;Dan Patterson&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;There are no parameters, all the values were defined internally.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/395449_SS2.png" style="width: 620px; height: 417px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 10:17:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264836#M9104</guid>
      <dc:creator>abdullahqasrawi</dc:creator>
      <dc:date>2018-02-01T10:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python script fails to run a model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264837#M9105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when run as a standalone script, the script has no idea if there are any selections in the data, hence, there is no inputs since you didn't use an sql expression&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/analysis/select.htm"&gt;http://pro.arcgis.com/en/pro-app/tool-reference/analysis/select.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if your intent is to just copy the data to a new location, then the help topic suggests using the Copy tool.&lt;/P&gt;&lt;P&gt;The model runs within the toolbox within ArcMap or Pro, because it knows of the existence of selections on the data.&amp;nbsp; The minute you run the script from outside in a standalone python IDE, the knowledge of what is selected and not selected is not known.&amp;nbsp; To fix this, you would need to provide an sql expression in order to get a 'selection'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 10:36:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264837#M9105</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-01T10:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python script fails to run a model</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264838#M9106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abdallah,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Your model uses&amp;nbsp;field calculator&amp;nbsp;&amp;nbsp;&amp;nbsp;to populate some fields, right?&amp;nbsp;&lt;/P&gt;&lt;P&gt;in that case try to change the expression type in the field calculator&amp;nbsp; from VB to Python and it will work with you.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="413701" class="image-1 jive-image" height="255" src="https://community.esri.com/legacyfs/online/413701_pastedImage_1.png" width="308" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2018 16:00:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-script-fails-to-run-a-model/m-p/264838#M9106</guid>
      <dc:creator>AhmadSALEH1</dc:creator>
      <dc:date>2018-07-10T16:00:25Z</dc:date>
    </item>
  </channel>
</rss>

