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

grip is not working w/ latest flask and werkzeug versions #377

Closed
daniel-eichinger-bl opened this issue Oct 4, 2023 · 2 comments
Closed

Comments

@daniel-eichinger-bl
Copy link

In the https://github.com/joeyespo/grip/blob/master/requirements.txt file it is stated that grip works with any version of flask or werkzeug higher than 0.10.1 and 0.7.

I tried grip out w/ the latest flask and werkzeug versions installed (v3.0.0) and there is an error thrown:

/opt/hostedtoolcache/Python/3.9.18/x64/bin/grip /home/runner/work/workflow-markdown-to-pdf/workflow-markdown-to-pdf/test/fixtures/example.MD --export ./result/example.html --pass ***
...
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.18/x64/bin/grip", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/grip/command.py", line 107, in main
    export(args['<path>'], args['--user-content'], args['--context'],
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/grip/api.py", line [116](https://github.com/snkeos/workflow-markdown-to-pdf/actions/runs/6402672966/job/17379723287#step:5:117), in export
    page = render_page(path, user_content, context, username, password,
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/grip/api.py", line 80, in render_page
    return create_app(path, user_content, context, username, password,
  File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/grip/app.py", line 400, in render
    encoding = response.charset
AttributeError: 'WrapperTestResponse' object has no attribute 'charset'

Installing the older flask and werkzeug versions before grip resolves this issue:

pip install werkzeug==2.3.7
pip install flask==2.3.3
pip install grip==4.6.1
@rhdez
Copy link

rhdez commented Oct 8, 2023

Same issue here… but I can't change my flask version because I have a web dev running with the latest flask package. :/

@joeyespo
Copy link
Owner

Patched! Just published version 4.6.2. (Upgrade with pip install --upgrade grip)

Thank you for reporting the issue. Re-open if there's other areas still broken with the new release of Flask & Werkzeug 3.0.0.

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

3 participants