You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using getcif, the following warning is displayed:
/Users/k-yoshimi/miniconda3/envs/my_pymatgen/lib/python3.12/site-packages/pymatgen/io/cif.py:1764: FutureWarning: We strongly discourage using implicit binary/text `mode`, and this would not be allowed after 2025-06-01. I.e. you should pass t/b in `mode`.
with zopen(filename, mode=mode) as file:
This warning indicates that the use of an implicit binary/text mode with zopen will no longer be allowed after June 1, 2025. To ensure compatibility with future versions, it is recommended to explicitly specify 't' (text) or 'b' (binary) in the mode argument when opening files.
Proposed Solution:
Update the zopen call in getcif to explicitly specify the file mode ('t' or 'b'), as suggested in the warning. This change will ensure compatibility with future versions of Python and avoid potential runtime errors.
Please let me know if any additional details or clarification are required.
The text was updated successfully, but these errors were encountered:
When using
getcif
, the following warning is displayed:This warning indicates that the use of an implicit binary/text mode with
zopen
will no longer be allowed after June 1, 2025. To ensure compatibility with future versions, it is recommended to explicitly specify't'
(text) or'b'
(binary) in themode
argument when opening files.Proposed Solution:
Update the
zopen
call ingetcif
to explicitly specify the file mode ('t'
or'b'
), as suggested in the warning. This change will ensure compatibility with future versions of Python and avoid potential runtime errors.Please let me know if any additional details or clarification are required.
The text was updated successfully, but these errors were encountered: