AnsweredAssumed Answered

ArcGIS Pro 2.1 causes crash on da.InsertCursor

Question asked by rogerloweth on Jan 22, 2018
Latest reply on Jan 22, 2018 by rogerloweth

Hi all:


I've just updated to ArcGIS Pro 2.1.0 and get the following error on code that has been working perfectly well in ArcGIS Pro 2.0.1 for months:


cursor = arcpy.da.InsertCursor(inputvesselfile, ['SHAPE@X', 'SHAPE@Y','SHAPE@Z', 'SHAPE@M'] + headers) 
                    count = 0
                    for row in reader:
                        newrow = [float(row[0]), float(row[1]), float(row[2]), int(row[5])] + row
                        line_name = row[6]
                        count += 1
                        if count%100 == 0:
                    del cursor

 The error I get is:

Traceback (most recent call last):
File "D:\roger\Documents\2_scripts_SS\", line 1201, in <module>
File "D:\roger\Documents\2_scripts_SS\", line 1196, in main
File "D:\roger\Documents\2_scripts_SS\", line 1016, in main
File "D:\roger\Documents\2_scripts_SS\", line 1009, in main
RuntimeError: workspace already in transaction mode


The error is happening on the second iteration of the code block, at cursor.insertRow(newrow).

Can anyone see why it's happening?

If not, can anyone tell me how to roll back to v2.0.1 which was working just fine?


Thanks, Roger