<?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: Update Cursor with Versioned Enterprise GDB (aka SDE) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/update-cursor-with-versioned-enterprise-gdb-aka/m-p/496729#M39008</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I followed Joshua's suggestion, I looked here as well ( just 'cuz it was the first hit on my google search)#:&amp;nbsp;&lt;A class="link-titled" href="http://ask.xmodulo.com/change-syspath-pythonpath-python.html" title="http://ask.xmodulo.com/change-syspath-pythonpath-python.html" rel="nofollow noopener noreferrer" target="_blank"&gt;How to change sys.path or PYTHONPATH in Python - Ask Xmodulo&lt;/A&gt;&amp;nbsp; which has a couple of ways to change the sys.path.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="" style="color: #444444; background: none white !important; border: 0px !important; margin: 0px !important; padding: 0px 1em !important;"&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; sys
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&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;/DIV&gt;&lt;P&gt;Which gives you an idea of where to place such a script.&amp;nbsp; In my case, I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;['', u'c:\\program files (x86)\\arcgis\\desktop10.5\\arcpy', 'c:\\program files (x86)\\arcgis\\desktop10.5\\bin', 'c:\\program files (x86)\\arcgis\\desktop10.5\\ArcPy', 'c:\\program files (x86)\\arcgis\\desktop10.5\\ArcToolbox\\Scripts', 'C:\\windows\\SYSTEM32\\python27.zip', 'C:\\Python27\\ArcGIS10.5\\Lib', 'C:\\Python27\\ArcGIS10.5\\DLLs', 'C:\\Python27\\ArcGIS10.5\\Lib\\lib-tk', 'C:\\Users\\JBorgione\\Desktop', 'C:\\Python27\\ArcGIS10.5', 'C:\\Python27\\ArcGIS10.5\\lib\\site-packages']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there are a ton of places for me to consider...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3420" target="_blank"&gt;Joshua Bixby&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python arcgis‌ ,&amp;nbsp;python;&amp;nbsp;&lt;A href="https://community.esri.com/t5/tag/sys.path/tg-p" target="_blank"&gt;#sys.path&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:50:14 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2021-12-11T21:50:14Z</dc:date>
    <item>
      <title>Update Cursor with Versioned Enterprise GDB (aka SDE)</title>
      <link>https://community.esri.com/t5/python-questions/update-cursor-with-versioned-enterprise-gdb-aka/m-p/496727#M39006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apparently there is a little gotcha when deploying an arcpy.da.UpdateCursor on a versioned feature class.&amp;nbsp; This post,&amp;nbsp;&lt;A href="https://community.esri.com/thread/132839"&gt;The requested operation is invalid on a closed state&lt;/A&gt;&amp;nbsp;goes into exactly what I've encountered.&amp;nbsp; In that same post, &lt;A href="https://community.esri.com/migrated-users/31388"&gt;Caleb Mackey&lt;/A&gt;‌ provides&amp;nbsp;some 'wrapper classes' that he says mitigates the problem.&amp;nbsp; He imports is module the same way one imports arcpy or numpy at the top of&amp;nbsp;a script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is where do I place his cursors.py module so I can import it and try it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 17:13:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-cursor-with-versioned-enterprise-gdb-aka/m-p/496727#M39006</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2017-09-28T17:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update Cursor with Versioned Enterprise GDB (aka SDE)</title>
      <link>https://community.esri.com/t5/python-questions/update-cursor-with-versioned-enterprise-gdb-aka/m-p/496728#M39007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this answer your question:&amp;nbsp; &lt;A class="link-titled" href="https://docs.python.org/2/tutorial/modules.html#the-module-search-path" title="https://docs.python.org/2/tutorial/modules.html#the-module-search-path"&gt;6.1.2. The Module Search Path — Python 2.7.14 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would look into modifying the &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;sys.path&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 18:07:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-cursor-with-versioned-enterprise-gdb-aka/m-p/496728#M39007</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-09-28T18:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update Cursor with Versioned Enterprise GDB (aka SDE)</title>
      <link>https://community.esri.com/t5/python-questions/update-cursor-with-versioned-enterprise-gdb-aka/m-p/496729#M39008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I followed Joshua's suggestion, I looked here as well ( just 'cuz it was the first hit on my google search)#:&amp;nbsp;&lt;A class="link-titled" href="http://ask.xmodulo.com/change-syspath-pythonpath-python.html" title="http://ask.xmodulo.com/change-syspath-pythonpath-python.html" rel="nofollow noopener noreferrer" target="_blank"&gt;How to change sys.path or PYTHONPATH in Python - Ask Xmodulo&lt;/A&gt;&amp;nbsp; which has a couple of ways to change the sys.path.&amp;nbsp; For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="" style="color: #444444; background: none white !important; border: 0px !important; margin: 0px !important; padding: 0px 1em !important;"&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; sys
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&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;/DIV&gt;&lt;P&gt;Which gives you an idea of where to place such a script.&amp;nbsp; In my case, I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;['', u'c:\\program files (x86)\\arcgis\\desktop10.5\\arcpy', 'c:\\program files (x86)\\arcgis\\desktop10.5\\bin', 'c:\\program files (x86)\\arcgis\\desktop10.5\\ArcPy', 'c:\\program files (x86)\\arcgis\\desktop10.5\\ArcToolbox\\Scripts', 'C:\\windows\\SYSTEM32\\python27.zip', 'C:\\Python27\\ArcGIS10.5\\Lib', 'C:\\Python27\\ArcGIS10.5\\DLLs', 'C:\\Python27\\ArcGIS10.5\\Lib\\lib-tk', 'C:\\Users\\JBorgione\\Desktop', 'C:\\Python27\\ArcGIS10.5', 'C:\\Python27\\ArcGIS10.5\\lib\\site-packages']&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there are a ton of places for me to consider...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3420" target="_blank"&gt;Joshua Bixby&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python arcgis‌ ,&amp;nbsp;python;&amp;nbsp;&lt;A href="https://community.esri.com/t5/tag/sys.path/tg-p" target="_blank"&gt;#sys.path&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:50:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/update-cursor-with-versioned-enterprise-gdb-aka/m-p/496729#M39008</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T21:50:14Z</dc:date>
    </item>
  </channel>
</rss>

