Workspace already in transaction mode

Last Published: April 25, 2020

Error Message

Running a Python script to edit nonversioned data stored in an enterprise geodatabase fails and returns the following runtime error:

Workspace already in transaction mode
The image of the Python error


There are a few possible causes for the error:

  • Insufficient license level to edit enterprise geodatabase.
  • The InsertCursor() function is used in a loop, as shown in the code sample below.
with arcpy.da.InsertCursor(PatchesFC, icFields) as iCursor:
  • The with_undo and multiuser_mode parameters of the startEditing() function is incorrect. For more information, refer to the following web help document, ArcGIS Desktop: Editor.

Solution or Workaround

Use one of the following solutions to solve the error:
  • Editing versioned data is only available with the Standard or Advanced license. Editing is disabled with the Basic license. Upgrade the license level to enable editing versioned data.
  • Declare the InsertCursor() function as an object instead of including it in a loop, as shown in the code snippet below.
iCursor = arcpy.da.InsertCursor(PatchesFC, icFields)
  • Set the with_undo and multiuser_mode parameters in the startEditing() function to False. With the parameters set to False, the full control of editing data is granted to the current user. The following code snippet demonstrates how to set the parameters to False.
edit.startEditing(False, False)
In the startEditing() function, the first parameter is the with_undo parameter and the second parameter is the multiuser_mode parameter.

For example:
startEditing({with_undo}, {multiuser_mode})

Article ID:000019111

  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic