I am attempting to iterate through and Mean two sets of corresponding rasters(each set conatains 136 files), named 'AQUA' (e.g. 'MOD04_3K.A2019060.mosaic.061.2019318071023.pssgmc_000501390776.Optical_Depth_Land_And_Ocean-Optical_Depth_Land_And_Ocean.tif') and 'TERRA' (e.g.'MYD04_3K.A2019060.mosaic.061.2019318064730.pssgmc_000501390767.Optical_Depth_Land_And_Ocean-Optical_Depth_Land_And_Ocean.tif'),but iam facing this Runtime error
Runtime error
Traceback (most recent call last):
File "<string>", line 7, in <module>
RuntimeError: ERROR 000732: Input Raster: Dataset D:\FINAL\TERRA\MYD04_3K.A2019060.mosaic.061.2019318064730.pssgmc_000501390767.Optical_Depth_Land_And_Ocean-Optical_Depth_Land_And_Ocean.tif.tif does not exist or is not supported
could be the double *.tif.tif at the end of the filename
Hi Raviteja,
Does shortening the file names allow the code to work? Also, does removing the periods (".") in the file names help?
-Lauren
i tried as you said,but still facing same issue :
Runtime error
Traceback (most recent call last):
File "<string>", line 9, in <module>
RuntimeError: ERROR 000732: Input Raster: Dataset D:\final 2\TERRA\MYD04_3K.A2019060_terra.tif does not exist or is not supported
Your file names and paths need some work since they will continue to generate errors unless you raw encode them or use forward slashes
# ---- big fail
f = "D:\final 2\TERRA\Some.File.With.Periods.tif"
f
'D:\x0cinal 2\\TERRA\\Some.File.With.Periods.tif' # ---- unicode fail
# ---- raw encoding with the little `r` works for sure
f = r"D:\final 2\TERRA\Some.File.With.Periods.tif"
f
'D:\\final 2\\TERRA\\Some.File.With.Periods.tif'
# ---- this works by chance because little f isn't the same as big F
f = "D:\Final 2\TERRA\Some.File.With.Periods.tif"
f
'D:\\Final 2\\TERRA\\Some.File.With.Periods.tif'