I am getting the error-000539: Error running expression: rcexec(). I've seen that other people have this same issue but I am not sure how to fix mine. I just want to average the values of 10 rasters, which are .tiff files. This code worked in my older version of ArcGIS but I had to update to the recent one and now it fails.

Here is the full error message:

ERROR 000539: Error running expression: rcexec()

Traceback(most recent call last)P

File "", line1, in

File "", line 8, in rcexec

Here is a picture of my raster calculator code.

Raster Calculator tool

This calculation is one step in a model since I need to do this many times. Here is a picture of that too if it helps.


  • 1
    Can you please edit your question to include the entire error message. You can get this by opening the Results window from the Geoprocessing menu. – Midavalo Mar 26 '17 at 16:45
  • @Midavalo Edit with full error message – mlfp88 Mar 26 '17 at 16:55
  • As always, check environment settings for extent. Also I'd use cell statistics tool instead of calculator – FelixIP Mar 26 '17 at 19:45
  • 2
    Try replacing 10 with 10.0 in your calculation, that will force the result to be of type float. – Hornbydd Mar 26 '17 at 20:24
  • It looks like you're trying to obtain the mean, perhaps it might be easier to use Cell Statistics resources.arcgis.com/en/help/main/10.2/index.html#//… with an input of all 10 rasters and statistics type of MEAN.. that way if you only have 9 or get an extra raster or two you don't need to fully recreate your model and parameters and can use a multi-select on your tool dialog. I would think that Cell Statistics might be faster as well.. – Michael Stimson Mar 27 '17 at 1:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.