-
Notifications
You must be signed in to change notification settings - Fork 185
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
bson.errors.InvalidDocument: cannot encode object: True, of type: <class 'numpy.bool_'> #522
Comments
migrated to i suspect this is related to the recent numpy v2 release. what's your version? it would be good for fireworks to replace all |
Hi, my numpy version is 1.26.4. |
i would first try to iterate through the for key, val in wf.metadata.items():
print(f"{key}: {type(val)}") to see if the offending value is in there. once you know the key, you just cast to wf.metadata[key] = bool(wf.metadata[key]) |
Thank you very much, it has worked successfully |
Python version
Python 3.11.5
Pymatgen version
2024.3.1
Operating system version
CentOS Linux release 7.6.1810 (Core)
Current behavior
Expected Behavior
I hope it can run successfully. I have located the error caused by lp.add_wf(opt_wf). Additionally, I have successfully verified that this is not an issue with the mongoDB connection. Successfully tested the connection to mongoDB
Minimal example
Relevant files to reproduce this bug
The text was updated successfully, but these errors were encountered: