NOAA-OWP / hydrotools

Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.
Other
53 stars 12 forks source link

`pint` caching fail leads to `FileNotFoundError` again. (`nwm_client_new`) #253

Closed jarq6c closed 3 weeks ago

jarq6c commented 1 month ago

Related to this: https://github.com/BAMresearch/FenicsXConcrete/issues/39 and this: https://github.com/hgrecco/pint/issues/1572

The problem is the pint cache does not update or regenerate due to the existence of ~/.cache/pint. The result is that if you install pint in one environment, destroy that environment, then install pint into another environment, pint will continue to look for files in the old environment (non-existent). Attempting to import pint from that moment forward will result in a very unhelpful FileNotFoundError, which is extremely annoying. The solution is to either delete ~/.cache/pint or set an explicit path for the relevant file.

I will update nwm_client_new to set an explicit file, since this package generates a file cache anyway.