Psycojoker / prosopopee

a static website generator to make beautiful customizable pictures galleries that tell a story
http://prosopopee.readthedocs.org
GNU General Public License v3.0
318 stars 55 forks source link

yaml options to be improved for latest python #151

Closed tshrinivasan closed 2 months ago

tshrinivasan commented 9 months ago

Getting below error when used with python3.10 in ubuntu 23.04

prosopopee autogen -d .
2023-10-28 12:25:20,235 ERROR (utils.py:85) - 
"safe_load()" has been removed, use

  yaml = YAML(typ='safe', pure=True)
  yaml.load(...)

instead of file "/usr/local/lib/python3.10/dist-packages/prosopopee/utils.py", line 72

            gallery_settings = yaml.safe_load(settings.read())

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/prosopopee/utils.py", line 72, in load_settings
    gallery_settings = yaml.safe_load(settings.read())
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py", line 1091, in safe_load
    error_deprecation('safe_load', 'load', arg="typ='safe', pure=True")
  File "/usr/local/lib/python3.10/dist-packages/ruamel/yaml/main.py", line 1025, in error_deprecation
    raise AttributeError(s, name=None)
AttributeError: 
"safe_load()" has been removed, use

  yaml = YAML(typ='safe', pure=True)
  yaml.load(...)

instead of file "/usr/local/lib/python3.10/dist-packages/prosopopee/utils.py", line 72

            gallery_settings = yaml.safe_load(settings.read())
QSchulz commented 9 months ago

This is only related to ruamel.yaml version, you can downgrade it to an earlier version (or maybe send a patch to fix it as suggested by the error :) ?)