I have been using Raster Calculator in ArcMap 10.2, today it started returning error 000539 for all actions. Previously it had worked fine. I have not made any change ot my ArcGIS, Python, or Windows 7 installation.

This is the error message I get:

Executing: RasterCalculator ""Carbon"  + 2" C:\Users\mem48\Documents\ArcGIS\Default.gdb\rastercalc6
Start Time: Tue Mar 17 15:48:30 2015
Raster(r"Carbon")  + 2
ERROR 000539: Error running expression: rcexec() 
Traceback (most recent call last):
  File "<expression>", line 1, in <module>
  File "<string>", line 2, in rcexec
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\__init__.py", line 24, in <module>
    from arcpy.toolbox import *
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox.py", line 351, in <module>
    from management import Graph, GraphTemplate
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 22, in <module>
    import _management
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_management.py", line 14, in <module>
    import _graph
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_graph.py", line 27, in <module>
    import numpy
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\numpy\__init__.py", line 137, in <module>
    import add_newdocs
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\numpy\add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\numpy\lib\__init__.py", line 4, in <module>
    from type_check import *
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\numpy\lib\type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\numpy\core\__init__.py", line 5, in <module>
    import multiarray
ImportError: DLL load failed: %1 is not a valid Win32 application.

Failed to execute (RasterCalculator).
Failed at Tue Mar 17 15:48:33 2015 (Elapsed Time: 3.37 seconds)

All the files mentioned in the message are present. I've tried using different inputs, output locations, and expressions. It seems that Raster Calculator has just failed completely.

What is wrong and how do I fix it?

  • 2
    Is it possible that you have called a raster calculator operation from model builder via a python script, or directly from python? In that case the next link might be useful, as it seems that arcmap can't preform raster calculator called from a python script. You might prefer to try using map algebra instead. Arc ERROR
    – dof1985
    Mar 17, 2015 at 20:25
  • @dof1985 I think you are right. Perhaps make this an answer here and/or at gis.stackexchange.com/questions/108839/… which sounds like the same issue
    – PolyGeo
    Mar 18, 2015 at 4:57
  • I'm using the raster calculator directly within ArcGIS
    – falcs
    Mar 19, 2015 at 12:56
  • Make sure your raster have defined spatial references. Because of this I was struggeling with the same Error eigther with raster calculator or math.
    – EikeMike
    Nov 21, 2019 at 8:04

1 Answer 1


As suggested, a possible answer is posted. It seems that arcgis-desktop can't call the raster calculator tool from within a python code, either with arcpy, or from python in model builder. Thus any call for raster calculator from a python code would end with an error. See attached link to ESRI support for thie error (#000539).

As mentioned in ESRI support, arcmap Math toolset can be used to workaround the problem. I suggest map algebra expressions as well, that should work within a python code. In the mag algebra link - the first raster calculator method, is irrelevant for this post, yer the python window or python IDE may both be valid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.