AnsweredAssumed Answered

Arcpy da Editor confusing

Question asked by waldman23 on Jul 30, 2014
Latest reply on Aug 4, 2014 by waldman23

Hi all,

 

I'm still new to arcpy and python. PLEASE can somebody explain why the first two lines of code create a runtime error, but the last two lines run fine?

 

>>> with arcpy.da.Editor(workspace) as edit:
...     edit.startEditing(False, True)
...     
Runtime error 
Traceback (most recent call last):
  File "<string>", line 2, in <module>
AttributeError: 'Workspace Operation object' object has no attribute 'startEditing'
>>> edit = arcpy.da.Editor(workspace)
>>> edit.startEditing(False, True)

 

THX!!

Outcomes