Solved! Go to Solution.
The environment settings (in the GP dialog) seem to be messing up the python window. Please make sure these geoprocessing environments set in the application (dialog) are pointing to a correct and exisiting location.
Is your map document saved with relative paths? Please let me know if yes?
We have had cases where geoprocessing environment workspaces get altered when opening an exsiting MXD document that has relative paths. This may be your cause. If so, to remedy, set the workspaces (or clear to default) and change the document to not contain relative paths and save the mxd again. We are investigating this.
Please note you can use the function arcpy.ResetEnvironments() in the python window to reset to the application settings (what is set in the geoprocessing environment dialog). Once you change an environment in the python window it should persits for that session or until you reset. You may have different environments for the python window and the GP tools, so be aware. Use the ResetEnvironments() to synch back with the application.
By default the output raster in your map algerbra expression will be created in the scratch workspace. If the environment dialog shows an incorrect path the GP tool will too.
Hope this helps. If you have a clear reproducible case please let me know.
BTW; is there a way (perhaps a setting) that will force the output raster name to be the one used in the command? At this moment I have to follow each command with myRaster.save("myRaster") to force it to have a name I want it to have.
See also thread: http://forums.arcgis.com/threads/42427-Define-the-output-name-of-a-raster-using-SA-and-Python