<?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: UnregisterAsVersioned python command fails in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unregisterasversioned-python-command-fails/m-p/1595546#M11222</link>
    <description>&lt;P&gt;Seems to work better with the ModelBuilder but If I make edit in a table or feature class in traditional versioning and save those edits, then the unregister command fails saying that there are edit. I have to unregister them manually and then it works.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Mar 2025 12:18:23 GMT</pubDate>
    <dc:creator>PierreMasson</dc:creator>
    <dc:date>2025-03-14T12:18:23Z</dc:date>
    <item>
      <title>UnregisterAsVersioned python command fails</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unregisterasversioned-python-command-fails/m-p/1589585#M11183</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have GDB that is register as Traditional versionning with data in it. There is no version. Only the default and all edits have been saved.&lt;/P&gt;&lt;P&gt;Now I want to unregister it for versionning to be able to register it again but for Branch versioning this time. And I don't want to loose my data.&lt;/P&gt;&lt;P&gt;There are many Fetures classes (in feature datasets) and a lot of table in my GDB. So I write a python script to do that. I read every documentation possible. Here's what my script do.&lt;/P&gt;&lt;P&gt;arcpy.management.DisableArchiving('table1')&lt;/P&gt;&lt;P&gt;arcpy.management.UnregisterAsVersioned('table1', 'KEEP_EDIT', 'COMPRESS_DEFAULT')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works for some table but for others it don't and I can find a reason why some work and some don't.&lt;/P&gt;&lt;P&gt;that is the error I get:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 33373, in UnregisterAsVersioned&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;raise e&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 33369, in UnregisterAsVersioned&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;gp.UnregisterAsVersioned_management(*gp_fixargs((in_dataset, keep_edit, compress_default), True))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 532, in &amp;lt;lambda&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;^^^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;arcgisscripting.ExecuteError: ERROR 000101: The dataset xyzx.sde.table1 contains edits to some versions.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;Failed to execute (UnregisterAsVersioned).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But If I do this using the UI, it works fine. I don't want to click "Manage", ok, etc for all the elements in my GDB. There are more than 100...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 17:52:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unregisterasversioned-python-command-fails/m-p/1589585#M11183</guid>
      <dc:creator>PierreMasson</dc:creator>
      <dc:date>2025-02-26T17:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: UnregisterAsVersioned python command fails</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unregisterasversioned-python-command-fails/m-p/1590096#M11184</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/69548"&gt;@PierreMasson&lt;/a&gt;&amp;nbsp;, there is a very old Fixed bug &lt;SPAN&gt;NIM046616&lt;/SPAN&gt;, which described what you are seeing. Maybe there has been some sort of regression that has allowed it to reappear ?&lt;/P&gt;&lt;P&gt;Does the Unregister As Versioned tool work for you in Model Builder ? If so, you might be able to use that to integrate through your datasets.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 15:22:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unregisterasversioned-python-command-fails/m-p/1590096#M11184</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2025-02-27T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: UnregisterAsVersioned python command fails</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/unregisterasversioned-python-command-fails/m-p/1595546#M11222</link>
      <description>&lt;P&gt;Seems to work better with the ModelBuilder but If I make edit in a table or feature class in traditional versioning and save those edits, then the unregister command fails saying that there are edit. I have to unregister them manually and then it works.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 12:18:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/unregisterasversioned-python-command-fails/m-p/1595546#M11222</guid>
      <dc:creator>PierreMasson</dc:creator>
      <dc:date>2025-03-14T12:18:23Z</dc:date>
    </item>
  </channel>
</rss>

