Skip to content
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

numpy.bool_ error #792

Open
jinlhr542 opened this issue Sep 21, 2024 · 0 comments
Open

numpy.bool_ error #792

jinlhr542 opened this issue Sep 21, 2024 · 0 comments

Comments

@jinlhr542
Copy link

jinlhr542 commented Sep 21, 2024

# Create a bandstructure from the workflow from the atomate presets
import numpy as np
from pymatgen.core import Structure
from fireworks import LaunchPad
from atomate.vasp.workflows.presets.core import wf_bandstructure
from atomate.vasp.powerups import add_modify_incar

# load structure from file
struct = Structure.from_file('POSCAR')  # note: many file formats supported, see function docs

# create the Workflow
wf = wf_bandstructure(struct)

# finally, instatiate the LaunchPad and add the workflow to it
lpad = LaunchPad.auto_load() # loads this based on the FireWorks configuration
lpad.add_wf(wf)

(3.12) [xys@master test]$ python test.py
Traceback (most recent call last):
File "/home/xys/test/test.py", line 15, in
lpad.add_wf(wf)
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/fireworks/core/launchpad.py", line 399, in add_wf
self.workflows.insert_one(wf.to_db_dict())
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/collection.py", line 658, in insert_one
self._insert_one(
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/collection.py", line 598, in _insert_one
self.__database.client._retryable_write(
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/mongo_client.py", line 1575, in _retryable_write
return self._retry_with_session(retryable, func, s, bulk, operation, operation_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/mongo_client.py", line 1461, in _retry_with_session
return self._retry_internal(
^^^^^^^^^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/_csot.py", line 108, in csot_wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/mongo_client.py", line 1507, in _retry_internal
).run()
^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/mongo_client.py", line 2353, in run
return self._read() if self._is_read else self._write()
^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/mongo_client.py", line 2470, in _write
return self._func(self._session, conn, self._retryable) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/collection.py", line 586, in _insert_command
result = conn.command(
^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/helpers.py", line 342, in inner
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/pool.py", line 1017, in command
self._raise_connection_failure(error)
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/pool.py", line 989, in command
return command(
^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/network.py", line 152, in command
request_id, msg, size, max_doc_size = message._op_msg(
^^^^^^^^^^^^^^^^
File "/home/xys/miniconda3/envs/3.12/lib/python3.12/site-packages/pymongo/message.py", line 758, in _op_msg
return op_msg_uncompressed(flags, command, identifier, docs, opts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bson.errors.InvalidDocument: cannot encode object: True, of type: <class 'numpy.bool
'>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant