<?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: Error when referencing user-owned sde versions in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373567#M29500</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you can see how the Change Version parameters look in Model Builder. It has separated, rendering incorrect, all non-DBO owned version names into Domain\Username and .VersionName. I'm at a loss how to fix this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Nov 2018 21:46:00 GMT</pubDate>
    <dc:creator>IngridHogle</dc:creator>
    <dc:date>2018-11-06T21:46:00Z</dc:date>
    <item>
      <title>Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373563#M29496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get a list of current SQL Server SDE versions so that I can then loop through these versions to get a count of features in each version. I believe the error that I get (below) may be a formatting error due to the backslashes and/or quotation marks in non-DBO-owned versions, but I cannot figure out a solution. Help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;import arcpy,os&lt;BR /&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python_connection = r"Database Connections\inv2018_python.sde"&lt;BR /&gt;arcpy.env.workspace = python_connection&lt;BR /&gt;arcpy.MakeFeatureLayer_management("DNA_18","lyr_DNA_18")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Get a list of versions&lt;BR /&gt;versions = arcpy.ListVersions(python_connection)&lt;BR /&gt;print versions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for version in versions:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print version&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # change to this version&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ChangeVersion_management("lyr_DNA_18","TRANSACTIONAL", version)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # update feature layer to reference this new version&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management("DNA_18","lyr_DNA_18")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # print a count of features in the feature layer &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetCount_management("lyr_DNA_18")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Python Interpreter:&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; &lt;BR /&gt;[u'dbo.DEFAULT', u'DBO.QA', u'DBO.EDITS', u'"ISP\\TOBY".TR_Edits', u'DBO.DNA_EDITS', u'"ISP\\MANDERSON".MA', u'"ISP\\BRIAN".BO', u'"ISP\\PLAILIKITNONT".PL', u'DBO.SC', u'"ISP\\JEANNE".jeanne']&lt;BR /&gt;dbo.DEFAULT&lt;BR /&gt;342&lt;BR /&gt;DBO.QA&lt;BR /&gt;342&lt;BR /&gt;DBO.EDITS&lt;BR /&gt;342&lt;BR /&gt;"ISP\TOBY".TR_Edits&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "&amp;lt;module1&amp;gt;", line 17, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.3\ArcPy\arcpy\management.py", line 16043, in ChangeVersion&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000800: The value is not a member of ISP\BRIAN | .BO | ISP\JEANNE | .jeanne | ISP\MANDERSON | .MA | ISP\PLAILIKITNONT | .PL | ISP\TOBY | .TR_Edits | dbo.DEFAULT | DBO.DNA_EDITS | DBO.EDITS | DBO.QA | DBO.SC.&lt;BR /&gt;Failed to execute (ChangeVersion).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 20:26:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373563#M29496</guid>
      <dc:creator>IngridHogle</dc:creator>
      <dc:date>2018-11-06T20:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373564#M29497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've taken the liberty of copying and pasting your code into the python Syntax Highlighter....&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;os
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcpy &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; env
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;

python_connection &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"Database Connections\inv2018_python.sde"&lt;/SPAN&gt;
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; python_connection
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DNA_18"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"lyr_DNA_18"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Get a list of versions&lt;/SPAN&gt;
versions &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListVersions&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;python_connection&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; versions

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; version &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; versions&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; version
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# change to this version&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ChangeVersion_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"lyr_DNA_18"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"TRANSACTIONAL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; version&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# update feature layer to reference this new version&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"DNA_18"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"lyr_DNA_18"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# print a count of features in the feature layer &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetCount_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"lyr_DNA_18"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This looks like a new arcpy method in ArcGIS Pro, and I haven't played with it at all yet, but at least you get to see how the syntax highlighter works....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373564#M29497</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T17:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373565#M29498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that's pretty. Now if we can just get it to work! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 21:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373565#M29498</guid>
      <dc:creator>IngridHogle</dc:creator>
      <dc:date>2018-11-06T21:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373566#M29499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Here you can see that when using Change Version in ModelBuilder, the names of all non-DBO versions are split in two, rendering them non-functional. Perhaps the fact that our network domain (&amp;quot;ISP&amp;quot;) preceeds our usernames is causing the problem, since all version names are split into &amp;quot;ISP\username&amp;quot; and .versionname." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/427870_ChangeVersionDialog.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 21:42:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373566#M29499</guid>
      <dc:creator>IngridHogle</dc:creator>
      <dc:date>2018-11-06T21:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373567#M29500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you can see how the Change Version parameters look in Model Builder. It has separated, rendering incorrect, all non-DBO owned version names into Domain\Username and .VersionName. I'm at a loss how to fix this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 21:46:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373567#M29500</guid>
      <dc:creator>IngridHogle</dc:creator>
      <dc:date>2018-11-06T21:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373568#M29501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the help:&amp;nbsp;&amp;nbsp;&lt;EM style="background-color: #ffffff; color: #4c4c4c;"&gt;Each input feature layer or table view will have its workspace modified to connect to the requested version.&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;&amp;nbsp;So, what is the practical application of this tool?&amp;nbsp; I guess I just don't get it.....&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 21:47:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373568#M29501</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2018-11-06T21:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373569#M29502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the first step of a more complex code I've written to check for specific edits of concern prior to automating nightly reconcile, post and delete of child versions. If I cannot figure out a way to loop through existing child versions, I will not be able to automate this process as I'd intended.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 21:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373569#M29502</guid>
      <dc:creator>IngridHogle</dc:creator>
      <dc:date>2018-11-06T21:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373570#M29503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ESRI Support got back to me: "&lt;SPAN style="font-size: 11.0pt;"&gt;We were able to determine that the behavior you are experiencing where the version string for an OS authenticated user appears to be split between the username and version name in the Change Version tool, is a known software defect in ArcGIS for Desktop 10.2.1 to and 10.3.1. The issue persists when using the tool in Python script where such versions do not get parsed in correctly. The good news is that the bug was fixed in version 10.4 ..."&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 19:48:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373570#M29503</guid>
      <dc:creator>IngridHogle</dc:creator>
      <dc:date>2018-11-14T19:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373571#M29504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a really weird response: the only way I find a reference for it is the ArcGIS Pro help.&amp;nbsp; No mention of it in earlier versions...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 21:55:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373571#M29504</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2018-11-14T21:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error when referencing user-owned sde versions in Python</title>
      <link>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373572#M29505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2018 21:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-referencing-user-owned-sde-versions-in/m-p/373572#M29505</guid>
      <dc:creator>IngridHogle</dc:creator>
      <dc:date>2018-11-14T21:58:51Z</dc:date>
    </item>
  </channel>
</rss>

