Raster Calculator does not work

11052
7
09-02-2013 01:47 PM
JeffBoyd
New Contributor
When I try to use the raster calculator (in ArcToolBox or as a command tool), I get a runtime error.  The error messages are shown    below.  And yes, I have a license for Spatial Analyst, but I seldom use it, so its quite possible that I am doing something obviously wrong.  The output raster, test02 does not exist yet (I tried pre-creating it, but that didn't work, either).  The input raster is integer, but float rasters are not working for me either.

Raster Calculator [143113_09022013]
Output raster:  <empty>
Messages
  Executing: Raster Calculator ??????R31107_G2I??? * 3??? C:\GIS_Data\DEM\NM\test02
  Start Time: Mon Sep 02 14:31:13 2013
  Raster(r???R31107_G2I???) * 3
  X  ERROR 000539: Runtime error
  X  traceback (most recent call last):
  X  File ???C:\Python27\ArcGIS10.1\Lib\warnings.py???, line29,   in_show_warningfile.write(formatwarning(message, category,filename,lineno,line))
X AttributeError: ???geoprocessing sys.stdout object??? object has no attribute ???write???

X  Failed to execute (RasterCalculator)
0 Kudos
7 Replies
JimCousins
MVP Regular Contributor
It all looks fine. No filenames too long (over 8 characters) or beginning with a number, no spaces in the file names or directory paths, no putting output into a geodatabase, so no permission issues. It should run. Attached is the setup I used in Raster Calculator.
How does it compare to your Raster Algebra setup?
Regards, Jim
0 Kudos
JeffBoyd
New Contributor
Jim,  yes, that is how I setup the calculation.
thanks,
Jeff
0 Kudos
JimCousins
MVP Regular Contributor
Puzzling. Can you share your raster file?
0 Kudos
JeffBoyd
New Contributor
I've attached the raster, in two versions.  The one ending in 'I' is an integer raster, the one in 'F' is floating point.  Neither one works for me in Raster Calculator.
thanks for your help. 
Jeff
0 Kudos
JeffreySwain
Esri Regular Contributor
It runs fine for me with multiplying each of them.  Can you indicate if you have any other python modules installed or if you have a different version of python that may have been installed? I would also consider putting a file extension such as .tif or .img to your output and see if that allows the process to complete.
0 Kudos
JimCousins
MVP Regular Contributor
Your file processes fine. The trouble seems to reside in your configuration. Have you tried a blank map, adding in 1 raster, and running the process? If this fails, you could try resetting to original install configuration, or run a detect and repair on the software.
A link to a forum post on resetting configuration:
http://forums.arcgis.com/threads/19645-is-there-a-reset-button-for-settings-how-do-i-restore-origina...
Regards,
Jim
0 Kudos
MichaelIoannides
New Contributor

Trying the operation on a new blank map solved this issue for me. Thanks!

0 Kudos