Hi there we've just migrated from ArcGIS desktop to ArcGIS Pro and there is an issue when trying to use concurrently arcpy.na.MakeVehicleRoutingProblemAnalysisLayer. When using arcpy we get the following error ERROR 160706: Cannot acquire a lock.Failed to execute (MakeVehicleRoutingProblemAnalysisLayer).
With ArcGIS desktop everything worked fine.
We tried changing env.workspace = "in_memory" to env.workspace = "memory" but it doesnt work. It appears that arcpy.na.MakeVehicleRoutingProblemAnalysisLayer is locked from the first call.
Our overall impression is that network analyst extension is not well supported in ArcGIS Pro.
Any ideas?
You should go to
160706: Cannot acquire a lock.—ArcGIS Pro | Documentation
and provide the necessary information given that the message, according to esri....
... it occurs so rarely that the typical causes have not been identified so no solution is available at this time
Thank you Dan, i ve just provided some info to the mentioned link. As it has to do with the error that we are facing, i believe that it is an issue of parallelism support. Apparently network analyst extension is not supported?!
https://www.esri.com/arcgis-blog/products/analytics/analytics/parallel-geoprocessing-in-arcgis-pro/
Network Analyst is quite well supported in ArcGIS Pro!
When using the arcpy.na make analysis layer tool, the layer is created referencing the analysis workspace in a file geodatabase. in_memory or memory env is not supported. If you are automating NA workflows in python then the recommended way is to use the arcpy.nax module (not layers). These python analysis classes will use in_memory feature classes (not file geodatases) and are high performance.
See the code samples here: VehicleRoutingProblem—ArcGIS Pro | Documentation
Jay Sandhu