Raster Calculator in Arcmap Desktop Python Script

1702
11
12-17-2019 10:59 PM
MudassarAli2
New Contributor

Dear All

I have a model builder in ARCMap desktop 10.5 which is executing fine. I have converted it to python script to make a batch script. But at the last step, where I am using raster calculator in model builder, getting an error. The line is

arcpy.gp.RasterCalculator_sa(constant_raster * float(value), rastercalc)

(where value is a variable and constant_raster is a raster dataset)

From the link Raster Calculator—Help | ArcGIS for Desktop  I came to know that RasterCalculator only function in model builder.

Is it any other wayaround that I could implement the raster calculator in my script?

Your response will be highly appreciated.

Thanks

0 Kudos
11 Replies
MudassarAli2
New Contributor

There is no issue of the path as the same script is running on one system but gives an error on the second one, which I have mentioned above. Is it any drivers conflict? How could I track it? 

0 Kudos
MudassarAli2
New Contributor

Anyone here?

0 Kudos