r1.save(outloc)
x = r1 + r2
x.save(outloc)
arcpy.AddMessage(str(r1)) arcpy.AddMessage(str(r2)) x = r1 + r2 arcpy.AddMessage(str(x))
I am working with a large number of temporary rasters. Individually they can be saved simply and without issue like
r1.save(outloc)
However, if they are combined in any way -e.g.
x = Raster(r1) + Raster(r2)
and the result saved
x.save(outloc)
I receive the following error
"RuntimeError: ERROR 010240: Could not save raster dataset to in_memory\times_ras1 with output format MEM."
If I save -all- the temporary rasters before they are combined the final rasters save without issue.
Any thoughts?
I have this same problem. Lots of rasters using in_memory. I have even used arcpy.Delete_management to remove them when i am done, but I still get this error.