Skip to content

ase_atoms_from_zip error #214

Closed
Closed
@TheCutestCat

Description

@TheCutestCat

hi, I try to run the example dataset check code :

from matbench_discovery.data import DataFiles, ase_atoms_from_zip

# # WBM initial structures as ASE Atoms
wbm_init_atoms = ase_atoms_from_zip(DataFiles.wbm_initial_structures.path)
assert len(wbm_init_atoms) == 256_963

the error:

Traceback (most recent call last):
  File "/root/chgnet/examples/wbm_test.py", line 38, in <module>
    wbm_init_atoms = ase_atoms_from_zip(DataFiles.wbm_initial_structures.path)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/chgnet/matbench-discovery/matbench_discovery/data.py", line 135, in ase_atoms_from_zip
    with zipfile.ZipFile(zip_filename) as zip_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/lib/python3.12/zipfile/__init__.py", line 1349, in __init__
    self._RealGetContents()
  File "/root/miniconda3/lib/python3.12/zipfile/__init__.py", line 1416, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

how can I fix that? I am sure that's the file format bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocsImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions