-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot load file from package directory using pathlib.Path()
#603
Comments
pathlib.Path()
pathlib.Path()
So this is definitely empack filtering out the txt files. You can workaround it by trying the approach suggested here: jupyterlite/xeus-python-kernel#79 (comment) Probably with something like:
|
In the long run, I think empack should not filter out too much by default, and only filter out things that it knows for sure should be filtered (tests, library-specific well known useless files) |
Ok, thank you - I'll try the workaround. In the meantime, we've made |
The
pint
package is used for physical units conversion. The underlying data is stored in .txt files that ship with the package, eg.:pint/default_en.txt
.This works fine in Pyodide, but using the xeus-python-kernel:
I get an error:
Full Error Message
This is because the package attempts to load the file using
pathlib.Path(__file__).parent.parent.parent / "default_en.txt"
:Why is this working fine in Pyodide, but not in the xeus-python-kernel?
See also:
brightway-lca/brightway-live#52
The text was updated successfully, but these errors were encountered: