<?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: Scripting tool does not return line error consitent with the error line in the script in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262722#M66049</link>
    <description>&lt;P&gt;hard to say, but what is in the vicinity of line 82 and what are the 8 messages that were reported? (eg did it report your line 96 and 97?&amp;nbsp; Also, how many lines of comments/ blank lines do you have (they may be stripped by the tool&amp;nbsp; when it makes the temporary script)&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 20:58:01 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2023-02-28T20:58:01Z</dc:date>
    <item>
      <title>Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262701#M66045</link>
      <description>&lt;P&gt;I am porting a scripting tool to Pro v3.&amp;nbsp; The error messages returned by my scripting tool return a line where the code failed but this line number is not the same as the line number in my Python IDE where I am writing the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the error message returned from the ArcToolbox scripting tool:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 657px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63933iE42E9ADFC2118F52/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is where the code failed (although I have the code sorted out now).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 738px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63934i0DD2608A657EA21F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.JPG" alt="Capture2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My question is why is the scripting tool error message not returning the same line as the Python code? How is it possible to debug scripts in Pro if you cannot determine the correct line of code that is failing?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 20:28:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262701#M66045</guid>
      <dc:creator>JoeLummi</dc:creator>
      <dc:date>2023-02-28T20:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262722#M66049</link>
      <description>&lt;P&gt;hard to say, but what is in the vicinity of line 82 and what are the 8 messages that were reported? (eg did it report your line 96 and 97?&amp;nbsp; Also, how many lines of comments/ blank lines do you have (they may be stripped by the tool&amp;nbsp; when it makes the temporary script)&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 20:58:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262722#M66049</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-02-28T20:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262807#M66055</link>
      <description>&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;Other messages?&amp;nbsp; I have arcpy.AddMessage sprinkled around in my script to&amp;nbsp; provide feedback.&amp;nbsp; Blank lines not counting?&amp;nbsp; That is just wrong if that is the case.&amp;nbsp; Hopefully someone from the ESRI team can confirm that.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 23:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262807#M66055</guid>
      <dc:creator>JoeLummi</dc:creator>
      <dc:date>2023-02-28T23:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262813#M66056</link>
      <description>&lt;P&gt;Wouldn't appear to be blank lines issue based on this test that returned the correct line 4 has not attribute fubar.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;import arcpy&lt;BR /&gt;&lt;BR /&gt;arcpy.fubar()&lt;BR /&gt;&lt;BR /&gt;except arcpy.ExecuteError:&lt;BR /&gt;# Get the tool error messages&lt;BR /&gt;msgs = arcpy.GetMessages(2)&lt;BR /&gt;# Return tool error messages for use with a script tool&lt;BR /&gt;arcpy.AddError(msgs)&lt;BR /&gt;# Print tool error messages for use in Python&lt;BR /&gt;print(msgs)&lt;BR /&gt;except:&lt;BR /&gt;# Get the traceback object&lt;BR /&gt;tb = sys.exc_info()[2]&lt;BR /&gt;tbinfo = traceback.format_tb(tb)[0]&lt;BR /&gt;# Concatenate information together concerning the error into a message string&lt;BR /&gt;pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1])&lt;BR /&gt;msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"&lt;BR /&gt;# Return Python error messages for use in script tool or Python window&lt;BR /&gt;arcpy.AddError(pymsg)&lt;BR /&gt;arcpy.AddError(msgs)&lt;BR /&gt;# Print Python error messages for use in Python / Python window&lt;BR /&gt;print(pymsg)&lt;BR /&gt;print(msgs)&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 23:09:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1262813#M66056</guid>
      <dc:creator>JoeLummi</dc:creator>
      <dc:date>2023-02-28T23:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263119#M66073</link>
      <description>&lt;P&gt;I guess others have discovered the same issues with the Pro 3.x ATBX file as well.&amp;nbsp; See this parallel posts replies over at GIS Stack Exchange:&amp;nbsp; &lt;A href="https://gis.stackexchange.com/questions/453100/arcpy-error-message-returns-absurd-line-error?noredirect=1#comment740427_453100" target="_blank"&gt;https://gis.stackexchange.com/questions/453100/arcpy-error-message-returns-absurd-line-error?noredirect=1#comment740427_453100&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 16:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263119#M66073</guid>
      <dc:creator>JoeLummi</dc:creator>
      <dc:date>2023-03-01T16:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263167#M66082</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/89710"&gt;@ShaunWalbridge&lt;/a&gt;&amp;nbsp;you may want to look into this or pass it along&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 17:51:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263167#M66082</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-03-01T17:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263226#M66094</link>
      <description>&lt;P&gt;Would you be able to report a bug to us for this? That'll help us keep track of it and notify affected customers once the issue is addressed. I agree its pretty annoying to not have the frames line up with the stated line numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 19:45:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263226#M66094</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2023-03-01T19:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263245#M66095</link>
      <description>&lt;P&gt;Bug report?&amp;nbsp; Gosh, no, probably not.&amp;nbsp; That feel like working for free;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 20:22:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1263245#M66095</guid>
      <dc:creator>JoeLummi</dc:creator>
      <dc:date>2023-03-01T20:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1357194#M75969</link>
      <description>&lt;P&gt;More than annoying, it might end up wasting hours of ones time and make one question reality. I finally ended up on this thread after a commented out line came up as the source of the error.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 00:25:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1357194#M75969</guid>
      <dc:creator>DavidRichey_EWEB</dc:creator>
      <dc:date>2023-12-06T00:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1357201#M75971</link>
      <description>&lt;P&gt;This issue is addressed for toolboxes in Pro 3.2, if you're on 3.2 and seeing this behavior, please provide details on it.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 00:56:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1357201#M75971</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2023-12-06T00:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting tool does not return line error consitent with the error line in the script</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1357202#M75972</link>
      <description>&lt;P&gt;I understand your position. Generally, users providing enough context that we can reproduce the issue in house and logging issues allow all users to see when an issue is addressed makes the overall experience better, since there is a formal feedback loop. In some cases, bugs can only be addressed with the specific data provided by a user, and when choosing between issues, we will tend to choose ones that are reproducible and interpretable. In this case, we could address the issue in house without any further work and have fixed it for Pro 3.2.&lt;BR /&gt;&lt;BR /&gt;Cheers, Shaun&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 01:00:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/scripting-tool-does-not-return-line-error/m-p/1357202#M75972</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2023-12-06T01:00:09Z</dc:date>
    </item>
  </channel>
</rss>

