I'm getting this:
Traceback (most recent call last):
File "<string>", line 3, in <module>
RuntimeError: Objects in this class cannot be updated outside an edit session [GDB_AGR_SECURE.AGR_ADMIN.ApiariesWGS_20160927]
When I run this:
I'm trying to update the point locations based on attributes.
Thanks in advance.
Solved! Go to Solution.
Have you tried setting the env workspace? Current Workspace (Environment setting)—Help | ArcGIS for Desktop
Right now, your 'workspace' is just a variable. It's not setting the arcpy.env.workspace. Also, that workspace is pointing to 'C:\Users\joanna.grossman\AppDate\Roaming\ESRI\Desktop10.4\ArcCatalog'... which I'm pretty sure isn't correct.
aha. It didn't exactly, but I switched to your template and it stopped doing the edit sesh error. It moved onto "RuntimeError: The version of your database server is not supported." So, now I have another fish to fry. Thanks for your help!
Try changing line 10 to:
edit = arcpy.da.Editor(filepath)
Line 07 is unnecessary. Furthermore, you need to pass the full path to the workspace, which is an SDE connection file in this case, and not the directory that contains the workspace.