Closed dpage closed 2 years ago
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5524#note-1 Originally created by Aditya Toshniwal at 2020-05-14 10:56:12 UTC.
Hi Dmitry,
I'm assuming you've installed using wheel package. Can you please share the output pip3 freeze ?
Thanks.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Assigned To changed | Dmitry Dmitry |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5524#note-2 Originally created by Dmitry Dmitry at 2020-05-14 11:02:40 UTC.
alembic==0.8.2.dev0 Babel==2.8.0 blinker==1.4 click==7.1.2 dnspython==1.16.0 email-validator==1.1.0 Flask==1.1.2 Flask-BabelEx==0.9.4 Flask-Login==0.5.0 Flask-Mail==0.9.1 Flask-Paranoid==0.2.0 Flask-Principal==0.4.0 Flask-Security==3.0.0 Flask-SQLAlchemy==2.4.1 Flask-WTF==0.14.3 idna==2.9 itsdangerous==1.1.0 Jinja2==2.11.2 Mako==1.0.3 MarkupSafe==0.23 passlib==1.7.2 pytz==2020.1 simplejson==3.17.0 speaklater==1.3 SQLAlchemy==1.0.11 Werkzeug==1.0.1 WTForms==2.3.1
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5524#note-3 Originally created by Aditya Toshniwal at 2020-05-14 11:57:28 UTC.
HI Dmitry,
Flask-Security was replaced recently with Flask-Security-Too. If you're using the latest version then this should have been replace. I would suggest you to 1) pip uninstall Flask-Security 2) pip install the pgadmin wheel again.
Thanks.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5524#note-4 Originally created by Joel Williamson at 2020-05-15 10:32:23 UTC.
Hi Aditya,
I am experiencing the same issue as Dmitry with identical traceback. When I run pip3 freeze, I notice that I do not have Flask-Security and do have Flask-Security-Too, and yet I still have the problem. Here is my pip3 freeze output.
acme==0.31.0 alembic==0.8.2.dev0 apt-clone==0.2.1 apt-xapian-index==0.47 apturl==0.5.2 asn1crypto==0.22.0 Babel==1.3 blinker==1.3 Brlapi==0.6.4 certbot==0.31.0 certbot-apache==0.31.0 certifi==2019.11.28 cffi==1.13.2 chardet==3.0.4 command-not-found==0.3 ConfigArgParse==0.11.0 configobj==5.0.6 cryptography==2.8 defer==1.0.6 dirspec==13.10 ecdsa==0.13 Flask==0.10.1 Flask-BabelEx==0.9.3 Flask-Compress==1.4.0 Flask-Gravatar==0.4.2 Flask-HTMLmin==1.3.2 Flask-Login==0.4.0 Flask-Mail==0.9.1 Flask-Migrate==1.7.0 Flask-Paranoid==0.2.0 Flask-Principal==0.4.0 Flask-Script==0.6.7 Flask-Security-Too==3.4.2 Flask-SQLAlchemy==1.0 Flask-WTF==0.14.2 funcsigs==0.4 future==0.18.2 htmlmin==0.1.12 httplib2==0.9.1 idna==2.5 itsdangerous==0.24 Jinja2==2.8 josepy==1.1.0 ldap3==1.0.3 louis==2.6.4 lxml==3.5.0 Mako==1.0.3 MarkupSafe==0.23 mock==1.3.0 ndg-httpsclient==0.4.2 oauthlib==1.0.3 onboard==1.2.0 oneconf==0.3.9 paramiko==1.16.0 parsedatetime==2.4 passlib==1.7.1 pbr==1.8.0 pexpect==4.0.1 Pillow==3.1.2 piston-mini-client==0.7.5 psutil==5.0.1 psycopg2==2.8.5 ptyprocess==0.5 pyasn1==0.1.9 pycparser==2.19 pycrypto==2.6.1 pycups==1.9.73 pycurl==7.43.0 pygobject==3.20.0 PyICU==1.9.2 PyJWT==1.3.0 pyOpenSSL==17.3.0 pyRFC3339==1.0 python-apt==1.1.0b1+ubuntu0.16.4.8 python-augeas==0.5.0 python-dateutil==2.4.2 python-debian==0.1.27 python-telegram-bot==12.2.0 python-xapp==1.0.0 pytz==2014.10 pyxdg==0.25 reportlab==3.3.0 requests==2.18.1 requests-toolbelt==0.8.0 screen-resolution-extra==0.0.0 sessioninstaller==0.0.0 setproctitle==1.1.8 simplejson==3.8.1 six==1.13.0 speaklater==1.4 SQLAlchemy==1.0.11 sqlparse==0.2.4 sshtunnel==0.1.4 system-service==0.3 thin-client-config-agent==0.8 tornado==6.0.3 ubuntu-drivers-common==0.0.0 ufw==0.35 urllib3==1.21.1 vboxapi==1.0 virtkey==0.63.0 Werkzeug==0.16.0 WTForms==2.1 xkit==0.0.0 zope.component==4.3.0 zope.event==4.2.0 zope.hookable==4.0.4 zope.interface==4.3.2
Any suggestion?
Thanks, Joel
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5524#note-5 Originally created by Yogesh Mahajan at 2020-05-29 10:53:17 UTC.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Status changed | New | Rejected |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5524#note-6 Originally created by Yogesh Mahajan at 2020-05-29 10:53:36 UTC.
Redmine ticket header update:
Name | Old Value | New Value |
---|---|---|
Relationship (duplicates) changed | RM #5565 |
Issue closed on Redmine.
Issue migrated from Redmine: https://redmine.postgresql.org/issues/5524 Originally created by Dmitry Dmitry at 2020-05-14 10:42:40 UTC.
I have installed pgadmin4 on Ubuntu 16.04
After installation I try to access pgadmin4 webpage via webbrowser or simply curl: curl 127.0.0.1:5050
and get folowing: {"data":null,"success":0,"errormsg":"'Request' object has no attribute 'is_json'","result":null,"info":""}
More detailed errors while running
python3.5 /usr/share/pgadmin4/web/pgAdmin4.py
Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser. 2020-05-14 13:22:21,663: ERROR pgadmin: 'Request' object has no attribute 'is_json' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flask/app.py", line 1473, in full_dispatch_request rv = self.preprocess_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1666, in preprocess_request rv = func() File "/usr/lib/python3/dist-packages/flask_principal.py", line 477, in _on_before_request identity = loader() File "/usr/lib/python3/dist-packages/flask_security/core.py", line 515, in _identity_loader if not isinstance(current_user._get_current_object(), AnonymousUserMixin): File "/usr/lib/python3/dist-packages/werkzeug/local.py", line 307, in _get_current_object return self.local() File "/usr/lib/python3/dist-packages/flask_login/utils.py", line 26, in
current_user = LocalProxy(lambda: _get_user())
File "/usr/lib/python3/dist-packages/flask_login/utils.py", line 302, in _get_user
current_app.login_manager._load_user()
File "/usr/lib/python3/dist-packages/flask_login/login_manager.py", line 313, in _load_user
return self._load_from_request(request)
File "/usr/lib/python3/dist-packages/flask_login/login_manager.py", line 370, in _load_from_request
user = self.request_callback(request)
File "/usr/lib/python3/dist-packages/flask_security/core.py", line 475, in _request_loader
if request.is_json:
File "/usr/lib/python3/dist-packages/werkzeug/local.py", line 348, in getattr__
return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute 'is_json'
2020-05-14 13:22:36,033: ERROR pgadmin: 'Request' object has no attribute 'is_json'