I have a model processes some raster datasets. It runs fine if I run it within the ModelBuilder environment, but I get syntax errors if I run it directly from a toolbox. The model has several raster calculator processes with somewhat complex map algebra statements with inline variable substitution. Seems like some python interpretor issue in raster calculator that is handled differently between ModelBuilding and direct toolbox
Attached are the model and the error. In the error screenshot, you can see the expression Im trying to use.
Any insight or suggestions would be greatly appreciated!
I'll throw out a couple of general " best practices" comments, as I'm not sure if either of these are specifically what is causing the issue but I have seen them cause problems in the past.
1. In your folder structure, rename any folders that have a period in them to eliminate the period. For example, in the error message posted there is a folder called 13R6.037.106_MBLW_P2Stdy. In ESRI GIS, the periods will throw some processes, even though in theory it should not matter. Also, try to keep the folder structure as short as possible. Again, in theory it should not matter if one has the data twenty folders out, but in practical reality things crash when the folder chain is long but work if the data is only a few folders out.
2. Also, it looks like you are doing the processing in the Default geodatabase. It's better to set up a geodatabase specifically for the project so you have more control over the settings.
Chris Donohue, GISP