<?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: Python env broken at Pro 2.6? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584509#M45852</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still see the problem at 2.6.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Sep 2020 16:53:08 GMT</pubDate>
    <dc:creator>MarkCederholm</dc:creator>
    <dc:date>2020-09-09T16:53:08Z</dc:date>
    <item>
      <title>Python env broken at Pro 2.6?</title>
      <link>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584507#M45850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm used to running my scripts directly via Python.exe in the enviornment folder, but after upgrading from 2.5.2 to 2.6, certain arcpy tools are failing* whereas others work fine.&amp;nbsp; It also fails at Pro's Python Command Prompt.&amp;nbsp; But when I run the same script in a Pro session via the Python Window, it works fine.&amp;nbsp; Has anyone else seen this?&amp;nbsp; Is there something new I have to do now?&amp;nbsp; And yes, I re-cloned and rebuilt my environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CreateDomain_management and&amp;nbsp;AddCodedValueToDomain_management.&amp;nbsp; I haven't gotten past those two.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2020 23:16:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584507#M45850</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2020-07-29T23:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Python env broken at Pro 2.6?</title>
      <link>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584508#M45851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see the same problem in the default environment.&amp;nbsp; And the plot thickens!&amp;nbsp; Here's a test script I created to duplicate the problem:&lt;/P&gt;&lt;P&gt;&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="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;DomainTest&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;object&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    _sTargetGDB &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:/apps/Data/UPDM_Migration/AssetPackage_AZGas.gdb"&lt;/SPAN&gt;
    _sBackupGDB &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:/apps/Data/UPDM_Migration/AssetPackage_UPDM.gdb"&lt;/SPAN&gt;
    _sDomainName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"UNSG_WorkCrew"&lt;/SPAN&gt;
    _sDesc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"UNS Gas work crew"&lt;/SPAN&gt;
    _Values &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"NPL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"UES"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;CreateDomain&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sBackupGDB&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Exists&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sTargetGDB&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sTargetGDB&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Copy_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sBackupGDB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sTargetGDB&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateDomain_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sTargetGDB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sDomainName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sDesc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"TEXT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"CODED"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AddValues&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; sVal &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_Values&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddCodedValueToDomain_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sTargetGDB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_sDomainName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sVal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sVal&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes CreateDomain works and sometime it doesn't.&amp;nbsp; If it works,&amp;nbsp;then DomainTest.AddValues() fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CreateDomain_management error is:&amp;nbsp;ERROR 000192: Invalid value for Domain Name&lt;BR /&gt;Failed to execute (CreateDomain).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The AddCodedValueToDomain error is:&amp;nbsp;&amp;nbsp;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000800: The value is not a member of AnnotationStatus | AP_All_Classes | AP_Association_Classes | AP_Association_Roles | AP_Association_Semantics | AP_Association_Types | AP_Attribute_Types..........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:08:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584508#M45851</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2021-12-12T01:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python env broken at Pro 2.6?</title>
      <link>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584509#M45852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still see the problem at 2.6.1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2020 16:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584509#M45852</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2020-09-09T16:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Python env broken at Pro 2.6?</title>
      <link>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584510#M45853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3521"&gt;Mark Cederholm&lt;/A&gt;‌, and others seeing this issue!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The issue has been logged as a defect with Pro 2.6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Cooper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Sep 2020 00:05:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/584510#M45853</guid>
      <dc:creator>CooperLogan</dc:creator>
      <dc:date>2020-09-19T00:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Python env broken at Pro 2.6?</title>
      <link>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/1157158#M64140</link>
      <description>&lt;P&gt;I found that the arcpy command syntax was the issue.&lt;/P&gt;&lt;P&gt;Replace the following arcpy commands:&lt;BR /&gt;arcpy.CreateDomain_management with &lt;STRONG&gt;arcpy.management.CreateDomain&lt;/STRONG&gt;&lt;BR /&gt;arcpy.AddCodedValueToDomain_management with &lt;STRONG&gt;arcpy.management.AddCodedValueToDomain&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This fixed my similar issue.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 06:54:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-env-broken-at-pro-2-6/m-p/1157158#M64140</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2022-03-24T06:54:55Z</dc:date>
    </item>
  </channel>
</rss>

