Working with ArcGIS Pro 2.9.5, ArcGIS API for Python 1.9.1,Python 3.7.11
A Python script is having some problems with the memory data space that have just cropped up.
This code was working in previous versions of Pro in a loop where the in memory veg layer is being redefined.
veg_layer = r"memory\veg"
if arcpy.Exists(veg_layer):
arcpy.management.Delete(veg_layer)
arcpy.management.MakeFeatureLayer(inrev_data_by_model_area[ma],veg_layer)
Now the script is failing with error:
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Layer: Dataset memory/veg_layer already exists.
Failed to execute (MakeFeatureLayer).
After running the code above the first time, the Exists command returns false and the Delete command fails with this message
Messages
Start Time: Friday, January 13, 2023 1:57:29 PM
WARNING 000110: in_memory/eru_2 does not exist
Succeeded at Friday, January 13, 2023 1:57:29 PM (Elapsed Time: 0.01 seconds)
yet rerunning the makefeaturelayer fails.
Somehow the data is both in and not in the memory dataspace. Same results using the in_memory dataspace.