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

Conflict with werkzeug version on new installation #1013

Open
vvandenschrieck opened this issue Aug 21, 2024 · 1 comment
Open

Conflict with werkzeug version on new installation #1013

vvandenschrieck opened this issue Aug 21, 2024 · 1 comment
Labels
Milestone

Comments

@vvandenschrieck
Copy link

vvandenschrieck commented Aug 21, 2024

Hello,

I'm currently deploying a new INGInious server, and run into what I think is a conflict with the werkzeug package version.

INGInious installation details

  • Version: 0.8.7, installed via pip on a Debian 12 and running on Apache/WSGI

To Reproduce
Steps to reproduce the behavior:

  1. Install INGInious with pip in a venv
  2. Configure Apache WSGI following the INGInious doc
  3. When displaying the main page, the INGInious app gives an error message. In the logs, the following exception shows :
Traceback (most recent call last):
  File "/inginious/lib/python3.11/site-packages/flask/app.py", line 904, in finalize_request
    response = self.process_response(response)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/inginious/lib/python3.11/site-packages/flask/app.py", line 1284, in process_response
    self.session_interface.save_session(self, ctx.session, response)
  File "/inginious/lib/python3.11/site-packages/inginious/frontend/flask/mongo_sessions.py", line 143, in save_session
    response.set_cookie(self.get_cookie_name(app), session_id,
  File "/inginious/lib/python3.11/site-packages/werkzeug/sansio/response.py", line 227, in set_cookie
    dump_cookie(
  File "/inginious/lib/python3.11/site-packages/werkzeug/http.py", line 1301, in dump_cookie
    if not _cookie_no_quote_re.fullmatch(value):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot use a string pattern on a bytes-like object
2024-08-21 20:38:30,215 - inginious.webapp.requests - INFO - 127.0.0.1:46372 - "- GET /" - 500 INTERNAL SERVER ERROR

The same exception occurs while running inginious directly with the inginious-webapp executable.

Temporary Fix

I was able to solve this issue by downgrading Werkzeug to version 2.3.7 instead of 3.0.1. Maybe this is a compatibility issue?

@vvandenschrieck vvandenschrieck added Bug Triage needed Project maintainers still have to review this issue labels Aug 21, 2024
@AlexandreDoneux
Copy link
Contributor

Hello, thanks for your issue. This was a problem we were aware of and had fixed (#972) . Unfortunately it was reverted by mistake.

@nrybowski nrybowski removed the Triage needed Project maintainers still have to review this issue label Aug 22, 2024
@nrybowski nrybowski added this to the v0.9.0 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants