Re: Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr' - Mailing list pgadmin-hackers

From Akshay Joshi
Subject Re: Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'
Date
Msg-id CANxoLDcknM0U0v-6bZcLjYVySc9BjA5GGVduw-qa_LerWW_imw@mail.gmail.com
Whole thread Raw
In response to Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'  (Safford <huang_haoting@126.com>)
List pgadmin-hackers
Hi Safford

We have fixed this issue and will be available in the next release. Meanwhile, you can try on the nightly build https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2020-02-17/

On Sun, Feb 16, 2020 at 9:49 PM Safford <huang_haoting@126.com> wrote:
When running pgAdmin4 python wheel version on Ubuntu 18.04 & python 3.6, I met this bug when entering 127.0.0.1:5050 in my browser:
```
2020-02-16 23:21:38,883: ERROR  pgadmin:        'Request' object has no attribute 'is_xhr'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.6/dist-packages/flask_login/utils.py", line 260, in decorated_view
    return current_app.login_manager.unauthorized()
  File "/usr/local/lib/python3.6/dist-packages/flask_login/login_manager.py", line 152, in unauthorized
    return self.unauthorized_callback()
  File "/usr/local/lib/python3.6/dist-packages/pgadmin4/pgadmin/utils/session.py", line 355, in pga_unauthorised
    if not lm.login_view or request.is_xhr:
  File "/usr/local/lib/python3.6/dist-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute ‘is_xhr'
```
I don’t know how to solve this problem, so I ask for help there.
My dependencies are:
Flask (1.1.1)
Flask-BabelEx (0.9.4)
Flask-Compress (1.4.0)
Flask-Gravatar (0.5.0)
Flask-Login (0.4.1)
Flask-Mail (0.9.1)
Flask-Migrate (2.4.0)
Flask-Paranoid (0.2.0)
Flask-Principal (0.4.0)
Flask-Security (3.0.0)
Flask-SQLAlchemy (2.3.2)
Flask-WTF (0.14.3)
Werkzeug (1.0.0)
pgAdmin4(4.18)




--
Thanks & Regards
Akshay Joshi
Sr. Software Architect
EnterpriseDB Software India Private Limited
Mobile: +91 976-788-8246

pgadmin-hackers by date:

Previous
From: Safford
Date:
Subject: Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'
Next
From: Akshay Joshi
Date:
Subject: pgAdmin 4 commit: Added option to override the class name of a label ta