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

From Safford
Subject Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'
Date
Msg-id B14EB3D7-01CF-461B-A1CF-5426CE364FDF@126.com
Whole thread Raw
Responses Re: Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
List pgadmin-hackers
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
mybrowser: 
```
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)



pgadmin-hackers by date:

Previous
From: Nagesh Dhope
Date:
Subject: [pgAdmin4][RM5185] Option to override select2control's label className
Next
From: Akshay Joshi
Date:
Subject: Re: Bug Report(py wheel v4.18):'Request' object has no attribute 'is_xhr'