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

0.13.1 breaks on werkzeug 3: Response' object has no attribute 'charset #214

Closed
ddorian opened this issue Nov 14, 2023 · 1 comment
Closed

Comments

@ddorian
Copy link

ddorian commented Nov 14, 2023

Looks like Response.charset has been deprecated since 2.30 and was removed in 3:

Traceback (most recent call last):
  File "/home/myproject/.venv/lib/python3.11/site-packages/flask/app.py", line 2213, in __call__
    return self.wsgi_app(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myproject/.venv/lib/python3.11/site-packages/whitenoise/base.py", line 81, in __call__
    return self.application(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myproject/.venv/lib/python3.11/site-packages/flask/app.py", line 2193, in wsgi_app
    response = self.handle_exception(e)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myproject/.venv/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myproject/.venv/lib/python3.11/site-packages/flask/app.py", line 1487, in full_dispatch_request
    return self.finalize_request(rv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myproject/.venv/lib/python3.11/site-packages/flask/app.py", line 1508, in finalize_request
    response = self.process_response(response)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myproject/.venv/lib/python3.11/site-packages/flask/app.py", line 2002, in process_response
    response = self.ensure_sync(func)(response)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myproject/.venv/lib/python3.11/site-packages/flask_debugtoolbar/__init__.py", line 260, in process_response
    content = content.encode(response.charset)
                             ^^^^^^^^^^^^^^^^^
AttributeError: 'Response' object has no attribute 'charset'
@ddorian
Copy link
Author

ddorian commented Nov 14, 2023

Will be fixed by #211

@ddorian ddorian closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant