Unsupported pixel type: Failed to execute MFD flow direction using arcpy.

547
0
12-17-2018 07:05 AM
MichaelGrimes
New Contributor

I'm just learning how to use arcpy scripting so this may seem rather basic, but I've searched all over to no avail. 

I've tried numerous ways to do this, always receiving this error: "arcgisscripting.ExecuteError: ERROR 999999: Error executing function. Unsupported pixel type: Failed to execute MFD flow direction using arcpy." 

Initially I was using a GRID input rather than TIFF, and was saving to a folder rather than GDB with .crf file extension after the output. I've then tried using a geodatabase (where file extensions aren't needed?) and still the same.

Am I missing something? I can run the tool in arcmap fine saving to the same file location with the .crf extension.

                                                                                                                   

import arcpy
from arcpy import env
import arcpy.sa
from arcpy.sa import *

env.workspace = "G:/PhD/GIS_Data"   # Set workspace
env.overwriteOutput = True   # Allow output overwriting
print arcpy.CheckOutExtension("Spatial")   # Check out Spatial analyst

arcpy.CreateFileGDB_management ("G:/PhD/GIS_Data", "NE_Grnlnd")   # Create Geodatabase
inraster = "TIFs/fillDEM_5m.tif"    # Set input raster
outFlowDirection = arcpy.sa.FlowDirection(inraster, "FORCE", "", "MFD")   # Conduct MFD flow direction with no drop raster
outFlowDirection.save("G:/PhD/GIS_Data/NE_Grnlnd/outflwdir1")   # Save flow direction
print "Completed Flow Direction"   # Print completion note‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

and the alternate version resulting in the same error:

env.workspace = "G:\PhD\GIS_Data"    # Set workspace
print arcpy.CheckOutExtension("Spatial")    # Check out Spatial analyst
inraster = "TIFs/fillDEM_5m.tif"    # Set input raster
outFlowDirection= arcpy.sa.FlowDirection(inraster, "FORCE", "", "MFD") # Conducts MFD flow direction with no drop raster
outFlowDirection.save("G:/PhD/GIS_Data/outputs/outflwdir1.crf") # Save flow direction as Cloud Raster Format . CRF
print "Completed Flow Direction"    # Print completion note 
0 Kudos
0 Replies