deepks-kit
deepks-kit copied to clipboard
yaml version out of date
When using the following package versions: Package Version
bcrypt 4.0.1 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 3.3.2 cryptography 41.0.5 dargs 0.4.3 deepks 0.2.dev79+g7978b39 dpdispatcher 0.6.2 idna 3.4 numpy 1.26.2 paramiko 3.3.1 pip 23.3 pycparser 2.21 PyNaCl 1.5.0 PyYAML 6.0.1 requests 2.31.0 ruamel.yaml 0.18.5 ruamel.yaml.clib 0.2.8 setuptools 68.0.0 tqdm 4.66.1 typeguard 4.1.5 typing_extensions 4.8.0 urllib3 2.1.0 wheel 0.41.2
The following error will occur:
Traceback (most recent call last):
File "/opt/mamba/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/mamba/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 11, in
yaml = YAML(typ='safe', pure=True) yaml.load(...)
instead of file "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/utils.py", line 138
res = yaml.safe_load(fp)
The safe_load and safe_dump functions used in deepks/utils.py has been deprecated since yaml 0.15.0. See https://yaml.readthedocs.io/en/latest/api/. We should think about update the supported version of yaml package.
Good catch! Do you want to write a PR for this?