[GIS] RuntimeError: ERROR 000732: Input Raster: Dataset ___ does not exist or is not supported

arcpyerror-000732raster-calculatorspatial-analyst

I am really new to ArcPy.

Here is my script:

# Name: Times_Ex_02.py
# Description: Multiplies the value of the input raster by a constant
#Requirements: Spatial Analyst Extension
# Import system modules and check extension
import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("Spatial")

# Set environment settings
env.workspace = "C:\Users\srchang\Desktop\outputshp"

# Set local variables
inRaster1 = arcpy.Raster("tifdodge10m")

# Execute Times to multiply inRaster1 by constant
outTimes = Times(inRaster1, 50.5443234836703)

# Save the output 
outTimes.save("C:\Users\srchang\Desktop\outputshp\outputtimes")

which returns the following error: ERROR 000732: Input Raster: Dataset tifdodge10m does not exist or is not supported.

I am thinking it is something to do with my path but i'm not sure

Best Answer

Your path names are invalid.

In place of:

env.workspace = "C:\Users\srchang\Desktop\outputshp"

try using:

env.workspace = r"C:\Users\srchang\Desktop\outputshp"

and do the same for outTimes.save()

Related Question