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

Error in running on bulk_data #6

Open
funihang opened this issue Oct 3, 2021 · 1 comment
Open

Error in running on bulk_data #6

funihang opened this issue Oct 3, 2021 · 1 comment

Comments

@funihang
Copy link

funihang commented Oct 3, 2021

Hello,

When I run the code on bulk_data, I found there is a json decoder error using ase.io.read(). Do you have the same problem?

Traceback (most recent call last):
File "main.py", line 552, in
main()
File "main.py", line 234, in main
config["Processing"],
File "/work/nihang/MatDeepLearn_new/matdeeplearn/process/process.py", line 105, in get_dataset
process_data(data_path, processed_path, processing_args)
File "/work/nihang/MatDeepLearn_new/matdeeplearn/process/process.py", line 329, in process_data
data_path, structure_id + "." + processing_args["data_format"]
File "/home/nihang/.local/lib/python3.7/site-packages/ase/io/formats.py", line 645, in read
parallel=parallel, **kwargs))
File "/home/nihang/.local/lib/python3.7/site-packages/ase/parallel.py", line 264, in new_generator
for result in generator(*args, **kwargs):
File "/home/nihang/.local/lib/python3.7/site-packages/ase/io/formats.py", line 713, in _iread
for dct in io.read(fd, *args, **kwargs):
File "/home/nihang/.local/lib/python3.7/site-packages/ase/io/db.py", line 22, in read_db
start, stop, step = index.indices(db.count())
File "/home/nihang/.local/lib/python3.7/site-packages/ase/db/core.py", line 495, in count
for row in self.select(selection, **kwargs):
File "/home/nihang/.local/lib/python3.7/site-packages/ase/parallel.py", line 264, in new_generator
for result in generator(*args, **kwargs):
File "/home/nihang/.local/lib/python3.7/site-packages/ase/db/core.py", line 484, in select
columns=columns):
File "/home/nihang/.local/lib/python3.7/site-packages/ase/db/jsondb.py", line 170, in _select
bigdct, ids, nextid = self._read_json()
File "/home/nihang/.local/lib/python3.7/site-packages/ase/db/jsondb.py", line 76, in _read_json
bigdct = decode(self.filename.read())
File "/home/nihang/.local/lib/python3.7/site-packages/ase/io/jsonio.py", line 141, in decode
obj = mydecode(txt)
File "/work/nihang/ENVS/mat_env/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/work/nihang/ENVS/mat_env/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@funihang
Copy link
Author

funihang commented Oct 3, 2021

I change the data format from json to cif and this problem is solved...I think you can change the get_MP.py to save these files as cif format instead of json.

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