Werkzeug >= 3.1.0 does not work - Mailing list pgadmin-support

From Peter
Subject Werkzeug >= 3.1.0 does not work
Date
Msg-id Yki9eG/CqBBtzlIH@gate.intra.daemon.contact
Whole thread Raw
Responses Re: Werkzeug >= 3.1.0 does not work  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
List pgadmin-support
Tried to install pgadmin4 6.7, did not work.

Issue #1: does not start, error is
AttributeError: module 'jinja2.ext' has no attribute 'autoescape'

This one is already known and discussed here:
     https://github.com/sphinx-doc/sphinx/issues/10289
Reverting from Jinja 3.1.1 to 3.0.3 solves the issue.


Issue #2: Web connects are responded with "400 bad request".
The issue appears with Werkzeug 2.1.1 and 2.1.0. It is solved with
installing Werkzeug 2.0.3 or below.

This one is kerberos related; it does not seem to happen with no
kerberos login enabled.

I give You the backtrace:

pgadmin:        400 Bad Request: The browser (or proxy) sent a request
 that this server could not understand. Traceback (most recent call
 last):
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/flask/wrappers.py",
    line 128, in on_json_loading_failed
         return super().on_json_loading_failed(e)
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/werkzeug/wrappers/request.py",
    line 611, in on_json_loading_failed
         raise BadRequest( werkzeug.exceptions.BadRequest: 400 Bad
           Request: Did not attempt to load JSON data because the
           request Content-Type was not 'application/json'.
 The above exception was the direct cause of the following exception:
 Traceback (most recent call last): 
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/flask/app.py",
    line 1521, in full_dispatch_request
         rv = self.preprocess_request()
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/flask/app.py",
    line 1861, in preprocess_request
         rv = self.ensure_sync(before_func)()
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/pgadmin4/pgadmin/__init__.py",
    line 792, in before_request
         return authenticate.login()
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/pgadmin4/pgadmin/authenticate/__init__.py",
    line 120, in login
         status, msg = auth_obj.authenticate()
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/pgadmin4/pgadmin/authenticate/__init__.py",
    line 231, in authenticate
         status, msg = source.authenticate(self.form)
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/pgadmin4/pgadmin/authenticate/kerberos.py",
    line 182, in authenticate
         if request.json:
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/werkzeug/wrappers/request.py",
    line 540, in json
         return self.get_json()
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/werkzeug/wrappers/request.py",
    line 571, in get_json
         return self.on_json_loading_failed(None)
    File "/ext/py-virt/py38-pga64/lib/python3.8/site-packages/flask/wrappers.py",
    line 133, in on_json_loading_failed
         raise BadRequest() from e werkzeug.exceptions.BadRequest: 400
           Bad Request: The browser (or proxy) sent a request that
           this server could not understand. 



pgadmin-support by date:

Previous
From: Henrique Becker
Date:
Subject: Error with ssh on Windows 11
Next
From: Akshay Joshi
Date:
Subject: Re: Werkzeug >= 3.1.0 does not work