AnsweredAssumed Answered

Drawing error when running python script tool in SDE

Question asked by geord359 on Jun 8, 2015

I have recently developed a python script tool which creates a unique ID and fills in a few fields in response to user input. In the most part it works fine. However, whilst editing in SDE I run into the error message "One or more layers failed to draw: The requested operation is invalid on a closed state".

 

 

Closed_State.png

 

This doesn't happen all the time but I'm concerned it may develop into a more serious problem. I am aware this problem has been addressed elsewhere and the consensus seems to be that arcpy.da.editor should be used to combat this problem. My problem is I only have access to ArcGIS 10.0 and so don't have access to arcpy.da.editor. Is there an equivalent workaround using 10.0? and how should it be implemented?

 

I should mention that running my script outside of the SDE editing session seems to bypass this problem. My script does what its supposed to do and I haven't, as yet, come across the above error. Can anyone confirm that this is the right thing to do regarding this problem? Or am I yet to run into the aforementioned error?

 

All help is appreciated

Outcomes