<?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: Alter Version tool, input name contains &amp;quot;\n&amp;quot; in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103786#M3561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to flag this to tech support.... I would be surprised if you are the first that has had this issue.. or you are the start of a wave &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jul 2019 15:10:34 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2019-07-11T15:10:34Z</dc:date>
    <item>
      <title>Alter Version tool, input name contains "\n"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103783#M3558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Feature services that create enterprise geodatabase edit versions are building version names in the format of "DOMAIN\username_servicename"&amp;nbsp; I have a Python script that attempts to rename the edit version when certain conditions are met.&amp;nbsp; However if the username starts with a lowercase "n", the tool interprets this as a Python newline and cannot find the version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Successful:&lt;/P&gt;&lt;P&gt;arcpy.AlterVersion_management(sdeConn,"&lt;STRONG&gt;DOM\jdoe_testing&lt;/STRONG&gt;","edits_jdoe","","PROTECTED")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not Successful:&lt;/P&gt;&lt;P&gt;arcpy.AlterVersion_management(sdeConn,"&lt;STRONG&gt;DOM\ndoe_testing&lt;/STRONG&gt;","edits_ndoe","","PROTECTED)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Runtime error&amp;nbsp; Traceback (most recent call last):&amp;nbsp; &amp;nbsp;File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&amp;nbsp; &amp;nbsp;File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\management.py", line 18176, in AlterVersion&amp;nbsp; &amp;nbsp; &amp;nbsp;raise e ExecuteError: ERROR 999999: Error executing function. Version not found [SRVR.DOM doe_testing] Failed to execute (AlterVersion).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; "&gt;DOM&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;\n&lt;/STRONG&gt;&lt;/SPAN&gt;doe_testing becomes&amp;nbsp;&lt;SPAN&gt;DOM doe_testing&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; "&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; "&gt;&lt;SPAN&gt;The Alter Version tool in ArcToolbox will let you select the edit version after identifying the database connection, but it populates as (from the example above) as "SRVR.DOMdoe_testing".&amp;nbsp; That allows the tool to start executing, but fails with the error of not being able to find the version.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; "&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; "&gt;&lt;SPAN&gt;I've tried what I know with raw strings, double backslash, changing to all uppercase for the version name with no success.&amp;nbsp; Anyone else experienced this and found a workaround?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2019 20:27:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103783#M3558</guid>
      <dc:creator>Steve_Salas</dc:creator>
      <dc:date>2019-07-10T20:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Version tool, input name contains "\n"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103784#M3559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried making it a variable&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;dom &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"DOM\ndoe_testing"&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AlterVersion_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sdeConn&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dom&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"edits_ndoe"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"PROTECTED"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and you were missing a double quote at the end of "PROTECTED" in case it was a copy issue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:22:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103784#M3559</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T06:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Version tool, input name contains "\n"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103785#M3560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - poor copy/paste skills on my part...&amp;nbsp; I did try making it a variable, same result:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff;"&gt;Version not found [SRVR.DOM doe_testing] Failed to execute (AlterVersion)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; "&gt;I've also tried using the output of arcpy.ListVersions(sdeConn) to get the name:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #000000; "&gt;u'SRVR.DOM\\ndoe_testing' so I pull that item from the returned list and use it as the input name.&amp;nbsp; Same error as above.&amp;nbsp; Maybe we just block users named Nick, Ned, Nancy, etc from using the system altogether.&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 13:29:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103785#M3560</guid>
      <dc:creator>Steve_Salas</dc:creator>
      <dc:date>2019-07-11T13:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Alter Version tool, input name contains "\n"</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103786#M3561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might want to flag this to tech support.... I would be surprised if you are the first that has had this issue.. or you are the start of a wave &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 15:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alter-version-tool-input-name-contains-quot-n-quot/m-p/103786#M3561</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-07-11T15:10:34Z</dc:date>
    </item>
  </channel>
</rss>

