Saving results from Int used on a raster (ERROR 010240)

10-12-2021 08:52 AM
Labels (3)
New Contributor II

I'm trying convert a raster from float to integers (see code and resulting error below). I've tried making env.workspace and env.scratchWorkspace the same/making them different/changing what geodatabases I'm saving to, and outputting the raster as different types of raster datasets (FGDBR, GRID, TIFF). The path works when running with other functions and I've verified that the float raster dataset works normally. It also works without any errors when running Int as a tool instead of in python. 

import arcpy

from arcpy import env

from import *

env.workspace = env.scratchWorkspace= path+"\\OnlineVisuals.gdb"


RuntimeError: ERROR 010240: Could not save raster dataset to r3241300I with output format FGDBR.

 I think the problem may be that when it runs Int on the raster it's creating a .afr file in a temp folder instead of paying attention to the set workspace (printing out_raster shows it's creating a file in the temp folder below), but I can't figure out how to change that? Thanks for any ideas/insight!


1 Reply
New Contributor III

Hi, did you figure this problem out? 

I'm using arcpy.Sa.Plus function on two rasters and I have exactly the same problem with saving the raster. 


0 Kudos