Error saving SUM raster output

Discussion created by dprosser on Feb 14, 2012
Latest reply on Feb 15, 2012 by dprosser
Hi all,

I have written python code to sum all rasters in a given workspace (extents are all the same; all null values have been replaced with zeros). I am receiving an error at the end of the code that says it could not save the raster dataset with ouptut format GRID. Can anyone help me fix this? Thanks in advance for any insight!
#Point to the DataPrep Output Folder
arcpy.env.workspace = "D:/GIS_Watf/Output_PrepAnalysis/"
fRasters = arcpy.ListRasters("f*", "GRID")
print fRasters
outWorkspace = "D:/GIS_Watf/Output_Analysis/"

i = 0
for f in fRasters:
    #print "processing raster %s" %os.path.join("D:/GIS_Watf/Output_Analysis/",f)  
    #sum rasters together
    if i == 0:
        outSUM = arcpy.Raster(f)
        i += 1
        outSUM = outSUM + f
        i +=1
    #save final output
    outSUM.save(outWorkspace + 'SppRich_wi')

Error message:
Traceback (most recent call last):
File "C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 312, in RunScript
exec codeObject in __main__.__dict__
File "D:\GIS_Watf\Command\Py03_SpeciesRichness_wi.py", line 47, in <module>
outSUM.save(outWorkspace + 'SppRich_wi')
RuntimeError: ERROR 010240: Could not save raster dataset to D:\GIS_Watf\Output_Analysis\SppRich_wi with output format GRID.

FYI: The majority of code was provided by R.D. in another forum posting: "Calculate sum of 2334 rasters..."