<?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 Custom toolbox Arcpy script keeps running even after complete execution in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549437#M73041</link>
    <description>&lt;P&gt;Good Day,&lt;/P&gt;&lt;P&gt;I am working on a custom arcpy toolbox. My tool keeps running and showing 'Updating' even after the code is executed completely and successfully till the last line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any procedure to properly terminate code in such arcpy scripts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice will be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rohanrajan_hms_1-1729161335264.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/117434iACC6BAE2F70E1237/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rohanrajan_hms_1-1729161335264.png" alt="rohanrajan_hms_1-1729161335264.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2024 10:36:55 GMT</pubDate>
    <dc:creator>rohanrajan_hms</dc:creator>
    <dc:date>2024-10-17T10:36:55Z</dc:date>
    <item>
      <title>Custom toolbox Arcpy script keeps running even after complete execution</title>
      <link>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549437#M73041</link>
      <description>&lt;P&gt;Good Day,&lt;/P&gt;&lt;P&gt;I am working on a custom arcpy toolbox. My tool keeps running and showing 'Updating' even after the code is executed completely and successfully till the last line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any procedure to properly terminate code in such arcpy scripts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice will be much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rohanrajan_hms_1-1729161335264.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/117434iACC6BAE2F70E1237/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rohanrajan_hms_1-1729161335264.png" alt="rohanrajan_hms_1-1729161335264.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 10:36:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549437#M73041</guid>
      <dc:creator>rohanrajan_hms</dc:creator>
      <dc:date>2024-10-17T10:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom toolbox Arcpy script keeps running even after complete execution</title>
      <link>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549447#M73042</link>
      <description>&lt;P&gt;what does your code do?&lt;/P&gt;&lt;P&gt;How does it increment and do you reset it when it reaches the end of the cycle?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/setprogressor.htm" target="_blank"&gt;SetProgressor—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 12:08:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549447#M73042</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-10-17T12:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Custom toolbox Arcpy script keeps running even after complete execution</title>
      <link>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549462#M73043</link>
      <description>&lt;P&gt;I've noticed that this tends to happen when you run an arcpy tool function. I believe that the handling of those calls is passed on to a different thread as those directly run tools written in C# or Java.&lt;/P&gt;&lt;P&gt;You could always try interrupting by raising an Exception then immediately catching that exception to exit the execute() call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without seeing the call that's causing the Updating hangup it's hard to tell though.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 13:18:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549462#M73043</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2024-10-17T13:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Custom toolbox Arcpy script keeps running even after complete execution</title>
      <link>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549552#M73047</link>
      <description>&lt;P&gt;The "Updating..." progressor state isn't controlled by Progressor calls from arcpy. It's usually done when progress state isn't implemented in a geoprocessing tool/function call or when the ArcGISPro thread takes over from the script to preform cleanup. I've seen it hang when making lots of edits and lock files get out of sync in file geodatabases.&lt;/P&gt;&lt;P&gt;Usually by the time you see this the actual script completed successfully, but the thread running the python tool remains locked for some reason.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 15:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-toolbox-arcpy-script-keeps-running-even/m-p/1549552#M73047</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2024-10-17T15:24:28Z</dc:date>
    </item>
  </channel>
</rss>

