Select to view content in your preferred language

Workspace or data source is read only

3525
3
10-28-2014 04:09 PM
MattEiben
Occasional Contributor

Hello everyone,

I've been having a raster processing arcpy problem for a while and am hoping the Python community may have some insight.

This is part of a much larger and fairly complex script that is set up in a batch fashion.  The script is designed to run through batches of hundreds of input points.  The raster processes the tool is having problems on are usually one of the following:

arcpy.sa.ExtractByMask

arcpy.sa.ExtractValuesToPoints

arcpy.sa.Int

arcpy.sa.Combine

The error is as follows:

Capture.PNG

The problem is definitely not with the tool, as the error can happen on batch process 10 up to well over process 100, but this error inevitably comes up.  From the error, is almost looks like ArcMap is writing some sort of temporary files to the local GDB before its saves the product to it's final location, but somehow locks itself out of its own process.  Based on my experience so far, this seems to be a ESRI arcpy bug, but I was hoping maybe someone in the community has had and/or solved this problem before.

Thanks in advance for any insight!

0 Kudos
3 Replies
curtvprice
MVP Esteemed Contributor

Are you sure you're not running out of disk space?

For best results when doing raster processing, you should set these two environments to a writeable folder with lots of available space, to make sure there is plenty of room for temporary files.

arcpy.env.workspace

arcpy.env.scratchWorkspace

0 Kudos
MattEiben
Occasional Contributor

There is definitely plenty of disk space left.  I originally thought it may be due to writing to a network, but (besides being a little faster), writing to the local machine produces the same error eventually.  I did think of a workaround last night that may get by this, though not fix the problem.

Essentially, just wrap each the problem raster processes in some sort of try/expect loop that detects if an exception was thrown and tries the process again.  A very hacky workaround, but may keep the batch from bombing out after 30+ minutes of processing.

0 Kudos
DanPatterson_Retired
MVP Emeritus

try saving it to a local drive that you have confirmed you have write permissions to.  Also ensure the path has no spaces or other unsavory characters.  Sometimes when stuff gets copied fro dvds network drives, write permissions are set

0 Kudos