<?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: Arcpy.da.Editor running on Server Error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275035#M21250</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I mentioned/asked yesterday, what credentials are being used by the server to connect.&amp;nbsp; Is the SDE conn file setup for OS authentication?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2019 15:52:23 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2019-01-16T15:52:23Z</dc:date>
    <item>
      <title>Arcpy.da.Editor running on Server Error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275030#M21245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a script that I am trying to run on an Application server that has Server Manager installed. It only has Python Arcpy 64-bit installed on it. Everything runs fine on my local machine which is where I have been doing testing.&lt;/P&gt;&lt;P&gt;It seems the arcpy.da.Editor cannot be started when running on ArcGIS Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Here are the steps the script is suppose to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. Set the&amp;nbsp;workspace with a .sde file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. Create&amp;nbsp;the arcpy.da.Editor object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3. Start editing session&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4. Use the&amp;nbsp;arcpy.da.UpdateCursor to update a field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5. Stop the editing session&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing fancy, but getting the script to run on the server seems to be the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the error I get from the Python IDLE&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "D:\Scripts\incident_DEV.py", line 65, in &amp;lt;module&amp;gt;&lt;BR /&gt; edit = arcpy.da.Editor(dev_workspace) # Start an edit session&lt;BR /&gt;RuntimeError: cannot open workspace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is the script I am trying to run.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts are appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:16:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275030#M21245</guid>
      <dc:creator>deleted-user-rbXU0bk8rtS8</dc:creator>
      <dc:date>2019-01-15T21:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.da.Editor running on Server Error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275031#M21246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Presumably we can simplify your script to this to replicate the error:&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
dev_workspace &lt;SPAN class="operator token"&gt;=&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; r&lt;SPAN class="string token"&gt;'\\nttafs1\ARCGIS\SDE Connections\NTTASDBDV3_SDE_Admin.sde'&lt;/SPAN&gt;
edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Editor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;dev_workspace&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What do you get when you print(&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;arcpy.Describe(dev_workspace)&lt;/SPAN&gt;)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:24:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275031#M21246</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T13:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.da.Editor running on Server Error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275032#M21247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you make a call to ArcPY, it needs to be able to run it via ArcGIS.&amp;nbsp; For example, we have a server that basically works the night shift. During the day it just sits idle but at night&amp;nbsp;it runs our&amp;nbsp;administrative ArcPy scripts. However&amp;nbsp;it has a full blown install of ArcGIS on it, and gets licensed from or license server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 23:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275032#M21247</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-01-15T23:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.da.Editor running on Server Error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275033#M21248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error message indicates that the process running the script on the server cannot access the workspace.&amp;nbsp; What account are you running ArcGIS Server with?&amp;nbsp; And, do those credentials have access to the network file share where the SDE conn file is stored?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2019 23:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275033#M21248</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-01-15T23:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.da.Editor running on Server Error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275034#M21249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My results:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/433438_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 14:19:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275034#M21249</guid>
      <dc:creator>deleted-user-rbXU0bk8rtS8</dc:creator>
      <dc:date>2019-01-16T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.da.Editor running on Server Error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275035#M21250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I mentioned/asked yesterday, what credentials are being used by the server to connect.&amp;nbsp; Is the SDE conn file setup for OS authentication?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 15:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275035#M21250</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-01-16T15:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy.da.Editor running on Server Error</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275036#M21251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to everyone's responses, we were able to successful find the fix to the error. Joshua's&amp;nbsp;comment gave me a reminder to check the user that Server is using. We figured out the&amp;nbsp;dev environment is completed messed up and I was trying to get the script running on the dev server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I switched everything to our test environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checked the Services under Administrative Tools to see which user is used for keeping ArcGIS Server running. We use a Group Service Account (gMSA) with no password.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I went into SQL Server Management Studio to add that gMSA account to have access to the Test SDE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Used the code that Darren mentioned to check if I can even run the code in the Python command line. That worked.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/433448_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then ran the script with Python IDLE and everything checked out. Now I don't need to install ArcGIS Desktop and use up a license. The script will use the ArcGIS Server license.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 16:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-running-on-server-error/m-p/275036#M21251</guid>
      <dc:creator>deleted-user-rbXU0bk8rtS8</dc:creator>
      <dc:date>2019-01-16T16:14:27Z</dc:date>
    </item>
  </channel>
</rss>

