Closed MarisaTrego-NOAA closed 2 years ago
@marisatrego can you please attach your log file?
If fonts are the issue, you can run models without the UI via the command line (invest run --headless
).
Oh yes, sorry. I meant to paste that in:
C:\InVEST_3.9.0_x64\invest-3-x64>invest.exe run habitat_risk_assessment
Traceback (most recent call last):
File "src\natcap\invest\cli.py", line 575, in
Attempting to run with --headless just mentions we need Datastack. I can see if that is something we are allowed to install if that is the fix.
That's interesting. I guess we should have a fallback font, even though it's local.
To run in headless mode (without the UI), you'll need to make a datastack file. This is a JSON file that stores all the model inputs you'd normally enter in the user interface. Here's an example for the Habitat Risk Assessment sample data:
hra_datastack.json:
{
"args": {
"aoi_vector_path": "/Users/emily/Downloads/InVEST_3.9.0_sample_data/HabitatRiskAssess/Input/subregions.shp",
"criteria_table_path": "/Users/emily/Downloads/InVEST_3.9.0_sample_data/HabitatRiskAssess/Input/exposure_consequence_criteria.csv",
"decay_eq": "Linear",
"info_table_path": "/Users/emily/Downloads/InVEST_3.9.0_sample_data/HabitatRiskAssess/Input/habitat_stressor_info.csv",
"max_rating": "3",
"resolution": "100",
"results_suffix": "",
"risk_eq": "Multiplicative",
"visualize_outputs": true
},
"invest_version": "3.9.0",
"model_name": "natcap.invest.hra"
}
Replace all the values with your actual inputs. Then
invest.exe run --headless --datastack <path\to\hra_datastack.json> --workspace <path\to\workspace\directory> habitat_risk_assessment
If you prefer to use the UI, it looks like you might be able to install just the font needed for the app: https://docs.microsoft.com/en-US/troubleshoot/windows-client/shell-experience/feature-to-block-untrusted-fonts#fix-apps-that-have-problems-because-of-blocked-fonts
As another avenue of inquiry, @marisatrego could you check the folder C:\InVEST_3.9.0_x64\invest-3-x64\qtawesome\fonts
and see if there's anything in there? I'm seeing 6 .ttf
files in there in the standard InVEST installation on Windows, and if they are not there for you, that might indicate a separate issue.
Either way, @emlys you're absolutely right that we should handle a fallback font.
Thanks for following up. It does look like I have 12 files in the font folder so that doesn't seem to be the issue. I did work with my IT department to try and install fonts and they said they couldn't modify the group policy (r the registry as suggested on that website). I can see if I can get this other workaround running.
@phargogh, maybe there's also a more standard font we could use instead that would be "trusted" by default.
@marisatrego thanks for checking out the fonts there! I don't suppose you'd be able to just install the fonts locally, would you? Is that allowed by group policy? I'm not surprised that modifying the registry would be pretty restricted.
@emlys It's possible! I think the ideal solution here would be twofold: 1) UTF-8 characters and 2) glyphs we have tested to be available on our target systems. The main reason for using QtAwesome/FontAwesome was that it offered a consistent visual language and didn't force us to manage bitmaps (which we were doing in an old version of the UI).
I was able to have IT install the fonts for all users (I don't have admin privileges) and unfortunately I am still getting the same error. There may be one other thing to try but they are on the east coast so I will have to wait until tomorrow. Thank you!
Closing because no activity for a few months.
I keep running into an issue that seems to be related to loading the iconic_fonts.py script and unfortunately my institution (one NOAA office) is not able to unblock the fonts needed. Is there anything else we can do as a workaround that doesn't require loading that font?