brightway-lca / brightway2-data

Tools for the management of inventory databases and impact assessment methods. Part of the Brightway LCA framework.
https://docs.brightway.dev/
BSD 3-Clause "New" or "Revised" License
8 stars 21 forks source link

Unable to import brightway2 if previously defined user directory is not present #107

Closed michaelweinold closed 2 years ago

michaelweinold commented 2 years ago

If a previously defined data directory has been removed or renamed, the Python import fails:

OSError: BRIGHTWAY2_DIR variable is /home/user/bw_data, but this is not a valid directory

More graceful alternatives:

cmutel commented 2 years ago

This is the desired behaviour. We can't guess intent when the user has been clear about what they want, but their configuration is invalid, and I think the error message explains the problem. I adjusted the documentation to make this clearer here: https://github.com/brightway-lca/brightway2/commit/cfaa2a6238a207daec78f256b040a15469d55b50.