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

Delay imports of Poscar and Chgcar of pymatgen.io.vasp.outputs #275

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Oct 6, 2023

This is imported in abipy.core.fields which is automatically imported when abipy is imported and this can raise the error:

FileNotFoundError: [Errno 2] No such file or directory: '..pymatgen/io/vasp/potcar_summary_stats.json.gz'

The absence of this file should not make it impossible to merely import abipy and so the imports of Poscar and Chgcar are relegated to inside the scope where they are actually used.

This is imported in `abipy.core.fields` which is automatically imported
when `abipy` is imported and this can raise the error:

FileNotFoundError: [Errno 2] No such file or directory: '..pymatgen/io/vasp/potcar_summary_stats.json.gz'

The absence of this file should not make it impossible to merely import
`abipy` and so the imports of `Poscar` and `Chgcar` are relegated to
inside the scope where they are actually used.
@gmatteo
Copy link
Member

gmatteo commented Oct 6, 2023

Thanks for the fix.

@gmatteo gmatteo merged commit e3d3776 into abinit:develop Oct 6, 2023
@sphuber sphuber deleted the fix/abipy-import branch October 6, 2023 14:58
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

Successfully merging this pull request may close these issues.

2 participants