<?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: progressor bar occasionally freezes  in arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/progressor-bar-occasionally-freezes-in-arcpy/m-p/1571652#M73428</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/559597"&gt;@JAYAKUMARKUMAR&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The arcpy.SetProgressorPosition() is called after each processed feature class, avoiding freezing or incorrect updates.&lt;BR /&gt;Please try like this in your script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Set the progressor
arcpy.SetProgressor("step", "Copying shapefiles to geodatabase...",
                    0, fc_count, 1)

# Create a file gdb to contain new feature classes
arcpy.CreateFileGDB_management(arcpy.env.workspace, "fgdb.gdb")

# For each shapefile, copy to a file geodatabase
for shp in fcs:
    # Trim the '.shp' extension
    fc = os.path.splitext(shp)[0]

    # Update the progressor label for current shapefile
    arcpy.SetProgressorLabel("Loading {0}...".format(shp))

    # Copy the data
    arcpy.CopyFeatures_management(shp, os.path.join("fgdb.gdb", fc))

    # Update the progressor position
    arcpy.SetProgressorPosition()

arcpy.ResetProgressor()



&lt;/LI-CODE&gt;&lt;P&gt;&lt;A title="resetprogressor" href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/resetprogressor.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/resetprogressor.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2024 10:37:21 GMT</pubDate>
    <dc:creator>SumitMishra_016</dc:creator>
    <dc:date>2024-12-30T10:37:21Z</dc:date>
    <item>
      <title>progressor bar occasionally freezes  in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/progressor-bar-occasionally-freezes-in-arcpy/m-p/1571651#M73427</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using the following code to process datasets and feature classes from a source geodatabase and apply edits to a destination SDE feature class using arcpy.da.Editor&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;STRONG&gt;progressor bar occasionally freezes&lt;/STRONG&gt; or doesn't update correctly during the dataset and feature class processing, which makes it hard to monitor the progress of the script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 10:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/progressor-bar-occasionally-freezes-in-arcpy/m-p/1571651#M73427</guid>
      <dc:creator>JAYAKUMARKUMAR</dc:creator>
      <dc:date>2024-12-30T10:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: progressor bar occasionally freezes  in arcpy</title>
      <link>https://community.esri.com/t5/python-questions/progressor-bar-occasionally-freezes-in-arcpy/m-p/1571652#M73428</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/559597"&gt;@JAYAKUMARKUMAR&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The arcpy.SetProgressorPosition() is called after each processed feature class, avoiding freezing or incorrect updates.&lt;BR /&gt;Please try like this in your script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Set the progressor
arcpy.SetProgressor("step", "Copying shapefiles to geodatabase...",
                    0, fc_count, 1)

# Create a file gdb to contain new feature classes
arcpy.CreateFileGDB_management(arcpy.env.workspace, "fgdb.gdb")

# For each shapefile, copy to a file geodatabase
for shp in fcs:
    # Trim the '.shp' extension
    fc = os.path.splitext(shp)[0]

    # Update the progressor label for current shapefile
    arcpy.SetProgressorLabel("Loading {0}...".format(shp))

    # Copy the data
    arcpy.CopyFeatures_management(shp, os.path.join("fgdb.gdb", fc))

    # Update the progressor position
    arcpy.SetProgressorPosition()

arcpy.ResetProgressor()



&lt;/LI-CODE&gt;&lt;P&gt;&lt;A title="resetprogressor" href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/resetprogressor.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/resetprogressor.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 10:37:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/progressor-bar-occasionally-freezes-in-arcpy/m-p/1571652#M73428</guid>
      <dc:creator>SumitMishra_016</dc:creator>
      <dc:date>2024-12-30T10:37:21Z</dc:date>
    </item>
  </channel>
</rss>

