AttributeError: 'NoneType' object has no attribute 'GetRasterBand'

What is the issue or question you have?

Hello! I am running DelineateIt to get the watershed from my raster DEM but I get the error "AttributeError: ‘NoneType’ object has no attribute ‘GetRasterBand’ " when I run the process. Do you know what this error means and how can I fix it?
I have already used the same DEM raster file to create the streams with RouteDEM and worked without problems. So, in principle, I understand that the error should not be caused by the file
Thank you very much in advance for your help.

What do you expect to happen?

I hope it works without errors.

What have you tried so far?

I checked the forum to see if this error had already been posted.

Attach the logfile here:

InVEST-natcap.invest.delineateit.delineateit-log-2023-09-18–09_46_59.txt (976.0 KB)

Hi @saralo,

Welcome to the forum and thanks for posting. I’m not quite certain what is happening but have a few questions from looking at your log.

  1. It looks like the file might be located in a Microsoft OneDrive Cloud location. Could you say if the DEM is physically located on your computer or if it’s stored in the cloud?
  2. It looks like the tool is delineating a lot of small watersheds. Could you try increasing the snap distance to something a bit larger? That value is in pixels, so it’s hard to say what makes sense because it depends on the resolution of your DEM. Just for debugging I would try setting that value to 500 and then see if the model completes and inspect the results.

Cheers,

Doug

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.