Hi there,
I have a model that I have been using in ArcMap for some time. A part of the model uses Raster Calculator to multiply a raster by a weighting (1 to 3) and stores the result in a .gdb.
The raster file is referenced via its name and pathname through a variable called 'Path Name' and the weight is supplied through a variable called 'Weight'. In the ArcMap model the simple Raster Calculator map algebra expression that worked was:
"%Path Name%" * %Weight% in ArcMap.
I have now recreated the model in Pro but the same map algebra expression keeps on giving the following error:
Error 000989 Python syntax error: File "<string>", line 1
"%Path Name%" * %Weight%
^
SyntaxError: invalid syntax
Any idea what the problem is with this?
Many thanks
Justin
Hi Justin,
I think you may need to remove the space in %Path Name%.
Either that or replace it with an underscore "%Path_Name%". My experiences is that spaces in variable names for rasters broke raster calculator parameter validation (checking) before substitution in the ArcMap raster calculator as well.