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

Python error on macOS #154

Open
sisyphosloughs opened this issue Mar 10, 2024 · 1 comment
Open

Python error on macOS #154

sisyphosloughs opened this issue Mar 10, 2024 · 1 comment

Comments

@sisyphosloughs
Copy link

Hi all,

I followd the instructions for macos: https://prosopopee.readthedocs.io/en/latest/install.html#mac.

When I try to launch prosopopee test I get this error:

2024-03-10 17:56:31,438 ERROR (utils.py:85) - 
"safe_load()" has been removed, use

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

instead of file "/Users/bbruecker/tmp/Prosopopee/ve/lib/python3.12/site-packages/prosopopee/utils.py", line 72

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


Traceback (most recent call last):
  File "/Users/bbruecker/tmp/Prosopopee/ve/lib/python3.12/site-packages/prosopopee/utils.py", line 72, in load_settings
    gallery_settings = yaml.safe_load(settings.read())
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bbruecker/tmp/Prosopopee/ve/lib/python3.12/site-packages/ruamel/yaml/main.py", line 1105, in safe_load
    error_deprecation('safe_load', 'load', arg="typ='safe', pure=True")
  File "/Users/bbruecker/tmp/Prosopopee/ve/lib/python3.12/site-packages/ruamel/yaml/main.py", line 1039, 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 "/Users/bbruecker/tmp/Prosopopee/ve/lib/python3.12/site-packages/prosopopee/utils.py", line 72

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

Any ideas?

@dani-corie
Copy link

dani-corie commented Jun 15, 2024

This is due to a breaking change in the yaml module. You will need to use the latest version from git. Just get it, and install by running pip install -e {prosopopee project folder} inside your venv.

Note that at the moment you'll also likely run into issue #147, so you'll have to manually downgrade jinja2 by running pip install jinja==3.0.3.

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

No branches or pull requests

2 participants