laptop and a wrench

漏洞

Data Access module's update cursor updates 1000 records then fails with "RuntimeError: The requested operation is invalid on a closed state" when the data is in a versioned SDE.

上次发布: August 25, 2014 ArcGIS for Desktop
漏洞 ID 编号 NIM084298
已提交August 30, 2012
上次修改时间June 5, 2024
适用范围ArcGIS for Desktop
找到的版本10.1
操作系统Windows OS
操作系统版本XP
修正版本10.1
状态Fixed

解决办法

Add a startOperation() and stopOperation() method into the edit session from within the python code. For example: #####import arcpyDBODefault = r"Database Connections\test.sde"Seg = "test.DBO.TestLimits"count = 1print "About to start editing"edit = arcpy.da.Editor(DBODefault)message = "Started Editing database..."edit.startEditing(False, True)edit.startOperation()with da.UpdateCursor(Seg,("Bfield")) as cur: for row in cur: row[0] = "Updated_fake" cur.updateRow(row) message = "Updated "+ str(count) print message count = count +1edit.stopOperation()edit.stopEditing(True)

重现步骤

漏洞 ID: NIM084298

软件:

  • ArcGIS for Desktop

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项