Hi,
I've recently had an odd error and found it was due to the way I set up the input. The really odd thing is that some tools worked, but another (arcpy.CalculateStatistics_management) failed with the error:
Failed to execute. Parameters are not valid.
ERROR 000840: The value is not a Mosaic Dataset.
ERROR 000840: The value is not a Mosaic Layer.
ERROR 000840: The value is not a Raster Dataset.
Even though checking the input showed it to be valid raster dataset.
Here's the code that failed:
If I put the full path, it worked. Seems that setting arcpy.env.workspace didn't work for this tool. Using this worked:
Is os.path.join something that should be used by default?
I've recently had an odd error and found it was due to the way I set up the input. The really odd thing is that some tools worked, but another (arcpy.CalculateStatistics_management) failed with the error:
Failed to execute. Parameters are not valid.
ERROR 000840: The value is not a Mosaic Dataset.
ERROR 000840: The value is not a Mosaic Layer.
ERROR 000840: The value is not a Raster Dataset.
Even though checking the input showed it to be valid raster dataset.
Here's the code that failed:
Code:
arcpy.CalculateStatistics_management("demExtract","1","1","#","OVERWRITE")
Code:
arcpy.CalculateStatistics_management((os.path.join(gdbPath, "demExtract")),"1","1","#","OVERWRITE")