I’m having trouble getting the v3.7.0 of the model to run on Mac. Three stressors and one habitat. Model is not recognizing the “porpoises.shp” in the habitat_layers folder. My CSV is UTF-8 and appears to be formatted properly.
Any ideas why it’s crashing? Inputs and outputs attached.
hra_error.zip (65.8 KB)
Hey Gregg, thanks for attaching your inputs! Could you provide your logfile as well? That’ll help to pin down the issue.
It’s in the “test2” workspace folder and also attached. Thanks, J.
InVEST-Habitat-Risk-Assessment-log-2019-11-25–13_36_58.txt (2.8 KB)
Hey Gregg, Thanks for the logfile! Sorry about missing it there in your input archive as well.
So, the issue here has to do with path construction: On mac, forward slashes ("/") are used to indicate nested directories, and backslashes ("\" or “\\” in python) are used on Windows. Your info table uses backslashes to indicate paths to habitat/stressor vectors and the model isn’t correcting the paths to use forward slashes before checking to see if the file exists.
The short-term solution here is to update your info CSV to use the directory separator of your OS (forward slash on mac). In the longer-term, though, we’ll update HRA to correctly handle these path separator discrepancies and release the fix with an upcoming version of InVEST.
Brilliant, James. It worked. PC guy trying to gracefully switch to Mac here. Thank you.