HQ concatenate error

Hi, I’m trying to run the HQ model (version 3.7) but I receive all the time the same error “TypeError: cannot concatenate ‘str’ and ‘long’ objects”. I can not understand what are the file that creates the problem and how I can solve it.
See Log file reported below

2019-11-11 18:12:24,996 utils.prepare_workspace(109) INFO Writing log messages to D:\GIS\Re\0_SE\HQ\OUTPUT\InVEST-Habitat-Quality-log-2019-11-11–18_12_24.txt
2019-11-11 18:12:24,997 model._logged_target(1633) Level 100 Starting model with parameters:
Arguments for InVEST natcap.invest.habitat_quality 3.7.0:
half_saturation_constant 0.5
lulc_cur_path D:/GIS/Re/0_SE/HQ/INPUT/Threats/LULC31.tif.ovr
n_workers -1
sensitivity_table_path D:/GIS/Re/0_SE/HQ/INPUT/SensitivityRLSE.csv
suffix
threat_raster_folder D:\GIS\Re\0_SE\HQ\INPUT\Threats
threats_table_path D:/GIS/Re/0_SE/HQ/INPUT/ThreatsRLSE.csv
workspace_dir D:\GIS\Re\0_SE\HQ\OUTPUT

2019-11-11 18:12:25,125 model._logged_target(1639) ERROR Exception while executing <function execute at 0x0F8B8430>
Traceback (most recent call last):
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\natcap\invest\ui\model.py”, line 1636, in _logged_target
File “Z:\opt\atlassian\pipelines\agent\build\env\lib\site-packages\natcap\invest\habitat_quality.py”, line 106, in execute
TypeError: cannot concatenate ‘str’ and ‘long’ objects
2019-11-11 18:12:25,127 model._logged_target(1642) INFO Execution finished
2019-11-11 18:12:25,128 utils.prepare_workspace(115) INFO Elapsed time: 0.13s

The error makes it sound like one or more of the values in the THREAT column of your threats table are numeric, when they should be a string label. Could you check that your THREAT column values are text labels? If they are, could you attach your threats table here so we can take a look?

Thanks,
James

Thank you James for your attention.
I tried to change the values in string lalel but the problem still the same.
I attached you the threat table.
Best

Silvia

ThreatsRLSE.csv (1.2 KB)

Hello,

Thanks for attaching your threats table! The model assumes that your threats are all strings, and your table is interesting because all of the threats are numbers, which ultimately causes the error. If you were to change the threat names to something that is definitely not a number (maybe convert “1111” to “threat1111” or something), I bet this will get past the immediate error. Remember that in renaming your threats in this table, you’ll also need to update the names of the threat rasters in your threats directory. Be sure to take a look at the naming requirements in the Data Needs section of the User’s Guide: http://releases.naturalcapitalproject.org/invest-userguide/latest/habitat_quality.html#data-needs

Let us know how this goes!
James

Dear James,
thank you for your suggestion, the model now works. It was the first time that I had this problem with the threats table.
Thank you for your assistance.
Best

Silvia