Hello NatCap team,
I downloaded the latest version of InVEST/SDR (source code via pip install on windows 10, 64bit), and I am having some issues with utils.py. Please see the error messages below. I tried to get around the first error but then different issues started to pop-up. In case you want to know, my input files (biophysical table/other rasters) work fine with the GUI version of the InVEST SDR module downloaded from your website.
Please let me know if you have any suggestions.
Thanks for your help,
Nitin
Errors -
C:\Users\singhnk\Documents\UVM\Labproject\InVEST>python python_script.py
Traceback (most recent call last):
File “python_script.py”, line 25, in
natcap.invest.sdr.execute(args)
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\sdr.py”, line 120, in execute
args[‘biophysical_table_path’], ‘lucode’)
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\utils.py”, line 454, in build_lookup_from_csv
key_field = unicode(key_field)
NameError: name ‘unicode’ is not defined (ERROR1)
C:\Users\singhnk\Documents\UVM\Labproject\InVEST>python python_script.py
Traceback (most recent call last):
File “python_script.py”, line 25, in
natcap.invest.sdr.execute(args)
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\sdr.py”, line 120, in execute
args[‘biophysical_table_path’], ‘lucode’)
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\utils.py”, line 474, in build_lookup_from_csv
for x in row])
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\utils.py”, line 474, in
for x in row])
NameError: name ‘basestring’ is not defined (ERROR2)
C:\Users\singhnk\Documents\UVM\Labproject\InVEST>python python_script.py
Traceback (most recent call last):
File “python_script.py”, line 25, in
natcap.invest.sdr.execute(args)
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\sdr.py”, line 124, in execute
for (lulc_code, table) in biophysical_table.iteritems():
AttributeError: ‘NoneType’ object has no attribute ‘iteritems’ (ERROR3)
C:\Users\singhnk\Documents\UVM\Labproject\InVEST>python python_script.py
Traceback (most recent call last):
File “python_script.py”, line 25, in
natcap.invest.sdr.execute(args)
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\sdr.py”, line 148, in execute
(_TMP_BASE_FILES, churn_dir)], file_suffix)
File “C:\Users\singhnk\AppData\Local\Programs\Python\Python37-32\lib\site-packages\natcap\invest\utils.py”, line 387, in build_file_registry
for file_key, file_payload in base_file_dict.iteritems():
AttributeError: ‘dict’ object has no attribute ‘iteritems’ (ERROR4)