Arcpy traversing the attribute field encounters Number of shapes does not match the number of table records

There are two situations for this error:
1. The following error is encountered when using arcpy to traverse attributes, the cursor used for traversal = arcpy.UpdateCursor(xx)

RuntimeError: ERROR 999999: Error executing function.
Number of shapes does not match the number of table records

2. When the program finishes running normally, an error window pops up when loading the vector layer in arcgis, and the word "can not open specified file" is written on the window. If you do not open it, directly use the geometry repair tool to repair the same error message as 1.
arcgis

Solution:
This problem is said to use a tool called shapechk on the Internet, but most of them require points. I am not convinced here, but I found it, and share it here:
Link: https://pan.baidu.com/ s/1Guf1l3rBsIKnUrRw66jcGQ
extraction code: mcvj

The method of using the software is very simple. After opening it, click the button from left to right once, and click the last button twice, and the result is repaired.

In addition, a link to solve this problem is attached, and the above software is also provided
https://blog.sunzexiang.com/archives/59.html

Guess you like

Origin blog.csdn.net/qq_20373723/article/details/109252975