AnsweredAssumed Answered

ArcPy Raster Function error

Question asked by jason.carter@waterboards on Dec 18, 2019
Latest reply on Feb 17, 2020 by Davepike101@hotmail.com

Hi,

 

I'm trying to read in a raster function to read a multi-band time series raster:

 

filein = os.path.join(os.getcwd(),r"raster_calcs\Russian-Raster-Drought\data\baseflow_day_HadGEM2-ES_rcp85_2018-2046_drought.tif")

 

myRaster = arcpy.Raster(filein)

 

and I receive a TypeError:

 

---------------------------------------------------------------------------TypeError                                 Traceback (most recent call last)<ipython-input-28-b2a611fe1e8d> in <module>      1 #create raster object from file----> 2 myRaster = arcpy.Raster(filein)C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Raster.py in __new__(cls, in_raster, is_multidimensional)     71      72   def __new__(cls, in_raster, is_multidimensional=False):---> 73     return super().__new__(cls, in_raster, is_multidimensional)     74      75   def getVariableAttributes(self, variable_name):TypeError: expected 1 arguments, got 2

 

I don't see two arguments here. What am I missing? 

Outcomes