<?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: cannot open workspace error when python script is called from a DevOps pipeline. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cannot-open-workspace-error-when-python-script-is/m-p/1285846#M67586</link>
    <description>&lt;P&gt;Thanks for taking the trouble to reply. I've printed the connection variable and it is a full path to the&amp;nbsp; . sde file.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 19:33:42 GMT</pubDate>
    <dc:creator>speaktoandrew2023</dc:creator>
    <dc:date>2023-05-04T19:33:42Z</dc:date>
    <item>
      <title>cannot open workspace error when python script is called from a DevOps pipeline.</title>
      <link>https://community.esri.com/t5/python-questions/cannot-open-workspace-error-when-python-script-is/m-p/1285712#M67584</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm at my wits end with this. (hence the post).&lt;/P&gt;&lt;P&gt;I've got a python script which will connect to a SQL database and insert some records.&lt;/P&gt;&lt;P&gt;I call this python script from a Powershell window and it works fine and inserts the records as required.&lt;/P&gt;&lt;P&gt;I call this same python script from an Azure DevOps pipeline ie from a powershell script and this time it throws an error on the line&amp;nbsp;&lt;BR /&gt;edit = arcpy.da.Editor(connection)&lt;/P&gt;&lt;P&gt;The error is : "cannot open workspace"&lt;/P&gt;&lt;P&gt;The only difference being the pipeline opens a remote session onto the machine and then calls the python script.&lt;/P&gt;&lt;P&gt;Could this be the reason for this behaviour? I have added "import arcserver" to the python script but this hasnt fixed the issue.&lt;/P&gt;&lt;P&gt;I know I havent given much but I'm looking for possible issues to explore.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 15:46:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-open-workspace-error-when-python-script-is/m-p/1285712#M67584</guid>
      <dc:creator>speaktoandrew2023</dc:creator>
      <dc:date>2023-05-04T15:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: cannot open workspace error when python script is called from a DevOps pipeline.</title>
      <link>https://community.esri.com/t5/python-questions/cannot-open-workspace-error-when-python-script-is/m-p/1285763#M67585</link>
      <description>&lt;P&gt;No familiar with&amp;nbsp;&lt;SPAN&gt;Azure DevOps pipeline, but what is the value of "connection" in your script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Just a thought that maybe it is to a mapped drive that doesn't get "mapped" when connecting with the pipeline instead of logging in locally?&amp;nbsp; If so, perhaps absolute paths would resolve it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 17:12:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-open-workspace-error-when-python-script-is/m-p/1285763#M67585</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-05-04T17:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: cannot open workspace error when python script is called from a DevOps pipeline.</title>
      <link>https://community.esri.com/t5/python-questions/cannot-open-workspace-error-when-python-script-is/m-p/1285846#M67586</link>
      <description>&lt;P&gt;Thanks for taking the trouble to reply. I've printed the connection variable and it is a full path to the&amp;nbsp; . sde file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 19:33:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-open-workspace-error-when-python-script-is/m-p/1285846#M67586</guid>
      <dc:creator>speaktoandrew2023</dc:creator>
      <dc:date>2023-05-04T19:33:42Z</dc:date>
    </item>
  </channel>
</rss>

