1

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.

Model

6
  • 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
    Commented Mar 26, 2017 at 16:45
  • @Midavalo Edit with full error message
    – mlfp88
    Commented Mar 26, 2017 at 16:55
  • As always, check environment settings for extent. Also I'd use cell statistics tool instead of calculator
    – FelixIP
    Commented Mar 26, 2017 at 19:45
  • 2
    Try replacing 10 with 10.0 in your calculation, that will force the result to be of type float.
    – Hornbydd
    Commented Mar 26, 2017 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.. Commented Mar 27, 2017 at 1:17

1 Answer 1

0

A colleague and I just had a similar error with rcexe. Looking at the error it appeared to actually be a problem with NumPy. After a lot of investigation including looking at the path that the ArcMap python version is using, we realised that the path contained Anaconda. This meant that python was trying to use the NumPy version from Anaconda and not the ArcMap version.

Couldn't work out where the path was being set (as it was not in the windows path), but changing the folder name of the anaconda files fixed the issue.

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.