0

enter image description hereCan somebody figure out whats going on here? I had absolutely no problems running these commands before. I am trying to add 1046 raster layers. I created a list of rasters using arcpy.ListRasters() Then used CellStatistics to "SUM" all the rasters in the list. Error 010240 was generated. Then repeated the procedure for only a few rasters. It worked. Repeated again for all the rasters and the error was generated again. Came back to a few rasters and the error is generated again! Clicking on the error either closes Arc with 'Not enough memory' message or nothing happens. Searching a tool and opening it opens a blank 'Script error' message. I'm using Arc 10.3. I recently installed Point cloud library and CMake and all the other dependencies. Both simple addition by looping and cell statistics are not working in any case now.

>>> ws="E:\Karun\MTech_Project\MB_RasterAnalysis.gdb"
>>> arcpy.env.workspace=arcpy.env.scratchWorkspace=ws
>>> rlist1
    [u'rast_1', u'rast_2', u'rast_3', u'rast_4', u'rast_5']
>>> fr=CellStatistics(rlist1,"SUM")
    RuntimeError: ERROR 010240: Could not save raster dataset to E:\Karun\MTech_Project\MB_RasterAnalysis.gdb\sumco_ras with output format FGDBR.
>>> fr=CellStatistics(rlist1,"SUM")
    RuntimeError: ERROR 010240: Could not save raster dataset to E:\Karun\MTech_Project\MB_RasterAnalysis.gdb\sumco_ras with output format FGDBR.
>>> rlist1[0]+rlist1[1]
    u'rast_1rast_2'
>>> Raster(rlist1[0])+Raster(rlist1[1])
>>> temp=Raster(rlist1[0])+Raster(rlist1[1])
    RuntimeError: ERROR 010240: Could not save raster dataset to E:\Karun\MTech_Project\MB_RasterAnalysis.gdb\plus_ras with output format FGDBR.
>>> 

1 Answer 1

1

Two things that I would check are:

First change:

ws="E:\Karun\MTech_Project\MB_RasterAnalysis.gdb"

to:

ws=r"E:\Karun\MTech_Project\MB_RasterAnalysis.gdb"

I think there is a good chance that improper pathname may be the problem

The other thing is that this syntax:

arcpy.env.workspace=arcpy.env.scratchWorkspace=ws

looks unusual to me. Try replacing it with:

arcpy.env.workspace=ws
arcpy.env.scratchWorkspace=ws

If that does not work then anytime that "Arc is acting completely strange" I would suggest using this successive series of bigger sticks on it until it behaves: closing/restarting ArcMap, deleting/renaming Normal.mxt, uninstalling/reinstalling ArcGIS for Desktop.

4
  • Thankyou! I tried those options. The error is still being generated. Also, Arc is acting completely strange after this. Search is not working; when I try to add a new folder, the folder thumbnails are completely black; clicking on the error is either crashing Arc or there is no response. There was no problem before with the same procedure. If you notice, there is no problem with this: >>> Raster(rlist1[0])+Raster(rlist1[1]) But this is generating an error: >>> temp=Raster(rlist1[0])+Raster(rlist1[1])
    – K_D
    Commented Nov 15, 2016 at 6:15
  • 1
    Anytime that "Arc is acting completely strange" I would suggest using this series of bigger sticks on it until it behaves: closing/restarting ArcMap, deleting/renaming Normal.mxt, uninstalling/reinstalling ArcGIS for Desktop.
    – PolyGeo
    Commented Nov 15, 2016 at 6:19
  • Saving to database could cause this. Perhaps try saving to folder
    – FelixIP
    Commented Nov 15, 2016 at 6:37
  • 1
    I deleted the Normal.mxt file. It seems to have been solved now. Thank you!
    – K_D
    Commented Nov 24, 2016 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.