Unobstructed Views: Scenic Quality Provision AttributeError


I am having trouble running the Unobstructed Views model and keep getting an error titled “Attribute Error encountered: ‘NoneType’ object has no attribute 'GetRasterBand”. I can see people have had similar issue with other models and hoping somehow can help me out.

I really appreciate your help!

I believe the issue is with the DEM data, however, I am not entirely sure. I have attached it here.
SarahISU_Ned.tif (513.4 KB)

Hi @sarahhalperin, usually these issues have something to do with opening a raster file, but it’s hard to say exactly which raster is causing this issue offhand. Could you attach the logfile from this run of InVEST so that we can take a closer look at where this error is occurring?


Thank you so much! I really appreciate your help. Please find the log attached. There is only one raster in the model which is the DEM. I have tried multiple DEM files and all of them come back with that error. I also see in the intermediate files that the DEM has successfully been clipped.

InVEST-Scenic-Quality-log-2020-06-12– (423.5 KB)

Ah! Now this is an interesting error … really gets at some low-level restrictions of the operating system there :slight_smile: Not every day that we see something like this! Basically, because you have so many viewpoints, the model had far too many files open and that was causing an error. If that hadn’t crashed, I suspect there would have been a different error a little later on.

In any case, could you try running this development build and see if that corrects the issue for you and let me know how it goes? I think you’re on a mac (based on the logfile) so here’s the mac binary:


1 Like

Hi James,

Thank you! I tried running with the development build and still got the same error. However, when I ran with less viewpoints it worked perfectly fine. I will reconsider how many points I need and try running it on my office desktop and see if that helps. Thank you so much for the help!

Thanks for trying out the development build! I’m glad things are at least working with fewer viewpoints, but I’d still like to fix this issue if at all possible. Would it be possible to share your inputs so I can try to reproduce it on my end? Feel free to attach them here to the thread or dropbox/gdrive/email them to Thanks in advance!

No problem! I really appreciate your help. I have sent you a link to a gdrive folder. Let me know if you have any problems with accessing the data.

One thing to note with this model is that, depending on your use case, a simple workaround here would be to split it up into multiple runs using subsets of your points. I think the model is currently designed to take advantage of parallel processing, so this shouldn’t be necessary if James can sort this out - but worth keeping in mind. If you have a really computationally demanding application, even for parallel processing, you could take advantage of this fact to run it on both of your computers, for example. This helped me considerably in an early application of this model I was involved in.


Hi @sarahhalperin, I don’t see the invitation to the gdrive folder … could you maybe try resending the link? Thanks!

OK! @sarahhalperin, thanks again for sharing your inputs to the model over email. I was able to reproduce the issue and made a few improvements to the model that should make it much, much more reliable when running on lots of viewpoints. It should also be a bit faster, too, and even more so on repeated runs using the same workspace. Here’s another development build in case you’d like to try out these latest changes:

Of course, running it on fewer points, or splitting the modelling across a few computers as @rmgriffin mentioned would also help to work around the issue!


Thank you so much! I really appreciate all the time you spent on this.