Apparently there is a little gotcha when deploying an arcpy.da.UpdateCursor on a versioned feature class. This post, The requested operation is invalid on a closed state goes into exactly what I've encountered. In that same post, Caleb Mackey provides some 'wrapper classes' that he says mitigates the problem. He imports is module the same way one imports arcpy or numpy at the top of a script.
My question is where do I place his cursors.py module so I can import it and try it?
Solved! Go to Solution.
As I followed Joshua's suggestion, I looked here as well ( just 'cuz it was the first hit on my google search)#: How to change sys.path or PYTHONPATH in Python - Ask Xmodulo which has a couple of ways to change the sys.path. For example:
Which gives you an idea of where to place such a script. In my case, I get:
['', 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']
So there are a ton of places for me to consider...
python arcgis , python; #sys.path