-
Notifications
You must be signed in to change notification settings - Fork 14
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
Build fails with "Object of type PosixPath is not JSON serializable" #113
Comments
And @martinRenou, I guess you have some bots to block (see above) 🙈 |
Since the main error seems to originate with this line: conda_meta_filename = f"{filename_base_from_meta(pkg_meta)}.json"
with open(filtered_prefix / "conda-meta" / conda_meta_filename, "w") as f:
json.dump(pkg_meta, f) Did we (in our Brightway packages) use some non-standard package name? |
I am a bit surprised by this error. It seems like a missing |
from empack import filter_env
path_env = "/opt/homebrew/Caskroom/miniconda/base/envs/xeus-python-kernel-test"
list_pkg_meta = [pkg_meta for pkg_meta in filter_env.iterate_env_pkg_meta(path_env)]
for pkg_meta in list_pkg_meta:
tempfile = "/tmp/tmp.json"
with open(tempfile, 'w') as file:
json.dump(pkg_meta, file) works fine on my local machine. Weird 🙈 |
I found the bug - the issue originates from the Running from empack import filter_env
[pip_pkg for pip_pkg in filter_env.iterate_pip_pkg_record("(...)/tmpfwwgtj1q/env/envs/xeus-python-kernel")] returns this dictionary:
...and that cannot be serialized to JSON. I'll see if I can figure out how to mitigate this. |
Why is name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- xeus-python
- numpy
- matplotlib ...but only appears if I add |
Description
When adding our
bw2io
package to theenvironment.yaml
as a dependency, I get an error of this kind:Interestingly, the error does not reference the package, nor any of its dependencies. The error trace goes from the micromamba build library to
jupyterlite_core/manager
>jupyterlite_xeus/add_on
>empack/pack
and then to the Pyhon JSON decoder.Any idea what the cause might be?
Reproduce
Expected behavior
No error 😇
Context
jupyterlite-core=0.3.0, jupyterlite-xeus=0.1.9
Build Log
The text was updated successfully, but these errors were encountered: