<?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: Model tool to Script not running in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808391#M897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You likely just need a return statement.&lt;/P&gt;&lt;P&gt;Myscript()&lt;/P&gt;&lt;P&gt;Return outputpath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Feb 2020 22:39:23 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2020-02-14T22:39:23Z</dc:date>
    <item>
      <title>Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808374#M880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I built a model tool which is running perfectly. Because I need to add some more functionalities like filtering, which I can only do with the script, I export the model to script and set the filter which is working fine also. However, when I run the script, it failed and send me a message which i will attach. I guess maybe it is from my tools which is make query table or the SQL statements in the tool which consist inline substitution or something else might be wrong. I will post the script error message, the script and the model. Please kindly help ASAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# -*- coding: utf-8 -*-&lt;BR /&gt;# ---------------------------------------------------------------------------&lt;BR /&gt;# single.py&lt;BR /&gt;# Created on: 2020-02-08 22:31:43.00000&lt;BR /&gt;# (generated by ArcGIS/ModelBuilder)&lt;BR /&gt;# Usage: single &amp;lt;Sitename&amp;gt; &amp;lt;Category&amp;gt; &amp;lt;Specie&amp;gt; &amp;lt;Start_Month&amp;gt; &amp;lt;End_Month&amp;gt; &amp;lt;Start_Year&amp;gt; &amp;lt;End_Year&amp;gt; &amp;lt;QueryTable&amp;gt; &amp;lt;QueryTable_Statistics&amp;gt; &lt;BR /&gt;# Description: &lt;BR /&gt;# ---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;BR /&gt;import arcpy&lt;BR /&gt;arcpy.env.workspace = "C:\waterfowl\waterfowl\waterfowl.gdb"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Script arguments&lt;BR /&gt;Sitename = arcpy.GetParameterAsText(0)&lt;BR /&gt;if Sitename == '#' or not Sitename:&lt;BR /&gt; Sitename = "Abgrabung Malsch/Durmersheim" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;Category = arcpy.GetParameterAsText(1)&lt;BR /&gt;if Category == '#' or not Category:&lt;BR /&gt; Category = "Taucher" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;Specie = arcpy.GetParameterAsText(2)&lt;BR /&gt;if Specie == '#' or not Specie:&lt;BR /&gt; Specie = "Haubentaucher" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;Start_Month = arcpy.GetParameterAsText(3)&lt;BR /&gt;if Start_Month == '#' or not Start_Month:&lt;BR /&gt; Start_Month = "1" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;End_Month = arcpy.GetParameterAsText(4)&lt;BR /&gt;if End_Month == '#' or not End_Month:&lt;BR /&gt; End_Month = "3" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;Start_Year = arcpy.GetParameterAsText(5)&lt;BR /&gt;if Start_Year == '#' or not Start_Year:&lt;BR /&gt; Start_Year = "1966" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;End_Year = arcpy.GetParameterAsText(6)&lt;BR /&gt;if End_Year == '#' or not End_Year:&lt;BR /&gt; End_Year = "2007" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;QueryTable = arcpy.GetParameterAsText(7)&lt;BR /&gt;if QueryTable == '#' or not QueryTable:&lt;BR /&gt; QueryTable = "QueryTable" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;QueryTable_Statistics = arcpy.GetParameterAsText(8)&lt;BR /&gt;if QueryTable_Statistics == '#' or not QueryTable_Statistics:&lt;BR /&gt; QueryTable_Statistics = "C:\\waterfowl\\Scratch\\scratch.gdb\\QueryTable_Statistics1" # provide a default value if unspecified&lt;/P&gt;&lt;P&gt;# Local variables:&lt;BR /&gt;locationbirdinfo = "locationbirdinfo"&lt;BR /&gt;False = "true"&lt;BR /&gt;False__2_ = "true"&lt;/P&gt;&lt;P&gt;# Process: Make Query Table&lt;BR /&gt;arcpy.MakeQueryTable_management&lt;/P&gt;&lt;P&gt;("locationbirdinfo", QueryTable, "USE_KEY_FIELDS", "", "", "locationbirdinfo.locationinfo_wvz_zaehlgebiete_oag_karlsruhe_Sitename = '%Sitename%' And locationbirdinfo.birdinformation_KAT_Bezeichnung = '%Category%' And locationbirdinfo.birdinformation_ART_Bezeichnung = '%Specie%' And locationbirdinfo.birdinformation_Month_ &amp;gt;= %Start Month% And locationbirdinfo.birdinformation_Month_ &amp;lt;= %End Month% And locationbirdinfo.birdinformation_DAT_Datum &amp;gt;= %Start Year% And locationbirdinfo.birdinformation_DAT_Datum &amp;lt;= %End Year%")&lt;/P&gt;&lt;P&gt;# Process: Summary Statistics&lt;BR /&gt;arcpy.Statistics_analysis(QueryTable, QueryTable_Statistics, "locationinfo_wvz_zaehlgebiete_oag_karlsruhe_Sitename MAX;birdinformation_KAT_Bezeichnung MAX;birdinformation_ART_Bezeichnung MAX;birdinformation_Month_ MIN;birdinformation_Month_ MAX;birdinformation_DAT_Datum MIN;birdinformation_DAT_Datum MAX;birdinformation_DAT_Anzahl SUM", "")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2020 17:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808374#M880</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-09T17:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808375#M881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you format your code so that it can be examined with proper indentation..&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting"&gt;/blogs/dan_patterson/2016/08/14/script-formatting&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2020 18:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808375#M881</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-09T18:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808376#M882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# Import arcpy module&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\waterfowl\waterfowl\waterfowl.gdb"&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;overwriteOutput &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Script arguments&lt;/SPAN&gt;
Sitename &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Sitename&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    Sitename &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Abgrabung Malsch/Durmersheim"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

Category &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Category&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    Category &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Taucher"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

Specie &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Specie&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    Specie &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Haubentaucher"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

Start_Month &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Start_Month&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    Start_Month &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"1"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

End_Month &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;End_Month&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    End_Month &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"3"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

Start_Year &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Start_Year&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    Start_Year &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"1966"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

End_Year &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;End_Year&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    End_Year &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"2007"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

QueryTable &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;QueryTable&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    QueryTable &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"QueryTable"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;

QueryTable_Statistics &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;QueryTable_Statistics&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    QueryTable_Statistics &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\\waterfowl\\Scratch\\scratch.gdb\\QueryTable_Statistics1"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# provide a default value if unspecified&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# Local variables:&lt;/SPAN&gt;
locationbirdinfo &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"locationbirdinfo"&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#False = "true"&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#False__2_ = "true"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Process: Make Query Table&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeQueryTable_management
&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"locationbirdinfo"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; QueryTable&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"USE_KEY_FIELDS"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"locationbirdinfo.locationinfo_wvz_zaehlgebiete_oag_karlsruhe_Sitename = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; 
Sitename &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_KAT_Bezeichnung = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; 
&lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; Category &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_ART_Bezeichnung = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; 
&lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; Specie &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_Month_ &amp;gt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; 
Start Month &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_Month_ &amp;lt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; 
End Month &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_DAT_Datum &amp;gt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; 
Start Year &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_DAT_Datum &amp;lt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; 
End Year&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Process: Summary Statistics&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Statistics_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;QueryTable&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; QueryTable_Statistics&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"locationinfo_wvz_zaehlgebiete_oag_karlsruhe_Sitename"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MAX"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"birdinformation_KAT_Bezeichnung"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MAX"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"birdinformation_ART_Bezeichnung"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MAX"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"birdinformation_Month_"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MIN"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"birdinformation_Month_"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MAX"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"birdinformation_DAT_Datum"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MIN"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"birdinformation_DAT_Datum"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MAX"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"birdinformation_DAT_Anzahl"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SUM"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:28:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808376#M882</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-12-12T09:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808377#M883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response. It worked but syntax error in line 65 0f my code which i don't see what is wrong with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/480814_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/480815_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2020 23:11:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808377#M883</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-09T23:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808378#M884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, I was quick to copy and send the code, but David Pike made the indentation right..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2020 23:13:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808378#M884</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-09T23:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808379#M885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah ok just add underscores as per your parameters&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Feb 2020 23:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808379#M885</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-02-09T23:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808380#M886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks....done that but it got worse, my throwing more errors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/480816_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 00:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808380#M886</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-10T00:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808381#M887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know/care if it works, but...&amp;nbsp; \ needed at the ends&lt;/P&gt;&lt;P&gt;Did modelbuilder really spit that out??? or was it edited??&amp;nbsp; If it was the former, then there is an issue that should be tracked down&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Sitename &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'a'&lt;/SPAN&gt;
Category &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'b'&lt;/SPAN&gt;
Specie &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'c'&lt;/SPAN&gt;
Start_Month &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'d'&lt;/SPAN&gt;
End_Month &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'e'&lt;/SPAN&gt;
End_Year &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'f'&lt;/SPAN&gt;
Start_Year &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'g'&lt;/SPAN&gt;

q &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"locationbirdinfo.locationinfo_wvz_zaehlgebiete_oag_karlsruhe_Sitename = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; \
Sitename &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_KAT_Bezeichnung = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; \
&lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; Category &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_ART_Bezeichnung = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;  \
&lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; Specie &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"'"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_Month_ &amp;gt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; \
Start_Month &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_Month_ &amp;lt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; \
End_Month &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_DAT_Datum &amp;gt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; \
Start_Year &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and locationbirdinfo.birdinformation_DAT_Datum &amp;lt;= "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; \
End_Year‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

&lt;SPAN class="comment token"&gt;# useless result&lt;/SPAN&gt;
q
&lt;SPAN class="string token"&gt;"locationbirdinfo.locationinfo_wvz_zaehlgebiete_oag_karlsruhe_Sitename = a and locationbirdinfo.birdinformation_KAT_Bezeichnung = 'b' and locationbirdinfo.birdinformation_ART_Bezeichnung = 'c' and locationbirdinfo.birdinformation_Month_ &amp;gt;= d and locationbirdinfo.birdinformation_Month_ &amp;lt;= e and locationbirdinfo.birdinformation_DAT_Datum &amp;gt;= g and locationbirdinfo.birdinformation_DAT_Datum &amp;lt;= f"&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808381#M887</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T09:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808382#M888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am sorry that does not work. Should I trace the problem of syntax back to my model tool and change the name of the parameters like put underscore in Start Month in my model tools parameter or what other thing could be wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/480843_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 07:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808382#M888</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-10T07:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808383#M889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your parameters cannot contain spaces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did the output from my example look reasonable given my default values to test the string?&lt;/P&gt;&lt;P&gt;More generally, it looks like you were working with a table with joins or something since the table.field notation (eg.&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit; font-size: 14px;"&gt;locationbirdinfo.birdinformation_ART_Bezeichnung&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;may work well in a model but it may fail in a script.&lt;/P&gt;&lt;P&gt;More generally, is that the "exact" output from the model? or did you edit portions of the output?&lt;/P&gt;&lt;P&gt;It would be much better to break that one query into a series of building blocks then concatenate them at the end just prior to feeding it into the query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 10:19:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808383#M889</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-10T10:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808384#M890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is a joined table..it worked will in the model but fail in the Script. I will look at it all over again, remove the space also reset the output and let you know if it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 11:22:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808384#M890</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-10T11:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808385#M891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, are you saying this&amp;nbsp;could be a problem , and might not work in Script but only in model.&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit; font-size: 14px;"&gt;locationbirdinfo.birdinformation_ART_Bezeichnung&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but It is important for me to use the joined table. Or are there any other ways to represent joined tables in python script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 20:39:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808385#M891</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-10T20:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808386#M892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends where you are running your script from.&amp;nbsp; If you are doing it within an open session of arcmap or Pro, then it should work. If you are trying to run it disconnected, then you would be advised to make the joins permanent by saving to a new table so that you get field names that are permanent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 20:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808386#M892</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-10T20:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808387#M893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is actually permanent because I exported it to file gdb. I think I am running within arcmap but I would love if I can run it within Pro 2.3, because that is where I built the model but because I cant export to script in Pro 2.3, I had to downgrade it to be able to open and export in arcmap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 20:56:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808387#M893</guid>
      <dc:creator>AyokunleAdebisi</dc:creator>
      <dc:date>2020-02-10T20:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808388#M894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Too bad&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/exporting-a-model-to-python.htm" title="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/exporting-a-model-to-python.htm"&gt;Export a model to Python—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should have upgraded ArcGIS Pro to 2.5 instead &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2020 23:00:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808388#M894</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-10T23:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808389#M895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot upgrade on my own ...only the school admin can do that. However, my script is working fine now without error but does not display on the table of contents on the map document.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 22:32:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808389#M895</guid>
      <dc:creator>AyokunleAdebisi1</dc:creator>
      <dc:date>2020-02-14T22:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808390#M896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;My script is working fine now without error but does not display on the table of contents on the map document. what could be the reasons for such.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 22:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808390#M896</guid>
      <dc:creator>AyokunleAdebisi1</dc:creator>
      <dc:date>2020-02-14T22:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808391#M897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You likely just need a return statement.&lt;/P&gt;&lt;P&gt;Myscript()&lt;/P&gt;&lt;P&gt;Return outputpath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 22:39:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808391#M897</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-02-14T22:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808392#M898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;navigate to the folder where you saved the results and see it if was created in the first place.&amp;nbsp; Not all operations add results to the map.&amp;nbsp; ArcGIS Pro does by default&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 22:41:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808392#M898</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-14T22:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Model tool to Script not running</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808393#M899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Results was not created...I can't find the output in the folder but was created in my result pane as successful...but could not add to display on the TOC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Feb 2020 08:23:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-tool-to-script-not-running/m-p/808393#M899</guid>
      <dc:creator>AyokunleAdebisi1</dc:creator>
      <dc:date>2020-02-15T08:23:16Z</dc:date>
    </item>
  </channel>
</rss>

