I'm trying to execute PYTHON code using IDLE but it gives me this error :
I'm using Arcgis 10.1, IDLE (Python 2.7)
Traceback (most recent call last):
File "C:/Saadia/SAFTOP/Parcelle et rivrains/simulation arcgis/python-script python/azimuth", line 6, in <module>
cur = arcpy.UpdateCursor("Parcelles_class_FeatureToPoi3")
File "D:\Program Files\ArcGIS\Server\arcpy\arcpy\__init__.py", line 1165, in UpdateCursor
return gp.updateCursor(dataset, where_clause, spatial_reference, fields, sort_fields)
File "D:\Program Files\ArcGIS\Server\arcpy\arcpy\geoprocessing\_base.py", line 364, in updateCursor
self._gp.UpdateCursor(*gp_fixargs(args, True)))
RuntimeError: ERROR 999999: Erreur lors de l’exécution de la fonction.
Impossible d’acquérir un verrouillage.
Impossible d’acquérir un verrouillage.
Solved! Go to Solution.
The "Impossible d'acquérir un vérouillage" message indicates that something else is using the table you are trying to update and ArcPy is unable to acquire an editing lock.
This may be ArcGIS for Desktop (if open in ArcMap or ArcCatalog), or by ArcGIS for Server if published as a service. If this is the case, close ArcGIS for Desktop, or stop the service.
If none of the above apply, it could be Python itself. This could occur if you are attempting to open multiple cursors on the same file, if you are not deleting the cursor once done, or if you script crashed and never got a chance to delete the lock. If this is the case, you may want to look at using the with...as...: syntax with a Data Access cursor. This clears your cursor once the script stops (including after a crash).
It's hard to say without seeing your code, but what pops out is it appears you're using the gpscripting code on Arc 10.1, when you should be using arcpy. I don't know what those last two lines are in English, so can't say much beyond that. Post the relevant code, be easier for folks here to debug.
The "Impossible d'acquérir un vérouillage" message indicates that something else is using the table you are trying to update and ArcPy is unable to acquire an editing lock.
This may be ArcGIS for Desktop (if open in ArcMap or ArcCatalog), or by ArcGIS for Server if published as a service. If this is the case, close ArcGIS for Desktop, or stop the service.
If none of the above apply, it could be Python itself. This could occur if you are attempting to open multiple cursors on the same file, if you are not deleting the cursor once done, or if you script crashed and never got a chance to delete the lock. If this is the case, you may want to look at using the with...as...: syntax with a Data Access cursor. This clears your cursor once the script stops (including after a crash).