dear users and supporters,
I use the version of InVEST 3.3.1 of the habitat quality model but when i run the model with all the inputs included I got an error:

File "C:\Users\natcap-servers\jenkins-home\workspace\natcap.invest\label\GCE-windows-1\exe\build\invest\out00-PYZ.pyz\natcap.invest.habitat_quality.habitat_quality", line 549, in make_dictionary_from_csv

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

Could someone explain me what can I do to resolve this error??

thank you!!!!


  • RichRich Administrator, NatCap Staff
    It's hard to tell just from that line, but I'd guess that either the threats table or sensitivity table have an empty column header.  Can you take a look and see if that makes sense?  If not, can you post the entirety of your log output?
  • Hi Rich,
    unfortunately I can't find the empty column, I send as attached the log file.
    thank you!!!

  • RichRich Administrator, NatCap Staff
    Okay, looks like it might be an issue with the sensitivity table.  Could you also attach the "C:/GIS/Habitat Quality_workspace/Input/sensitivity.csv" file here as well?
  • here is the csv table.
    thank you so much
  • csv table
  • RichRich Administrator, NatCap Staff
    Hi Silvia, it looks like that for lucode 222 you have a 0 in L_131 column, and a 5 in L_133 column.   This causes the 222 row to have one extra column that the other rows don't have which results in an empty column header.  Offhand, I'd guess you wanted a 0.5 in L_131 but put a comma as a typo (0,5 vs. 0.5).  

    I took the liberty of making that change and am attaching it here: https://www.dropbox.com/s/jqig44u3a2830jw/sensitivity.csv?dl=0

    Can you try that new table to see if it fixes your issue?

  • wow!! perfect, the model run correctly, thank you so much!!!!!!
This discussion has been closed.