Re: pgadmin4 suddenly not working - ImportError: cannot import name 'view_commit' - Mailing list pgadmin-support
From | Aditya Toshniwal |
---|---|
Subject | Re: pgadmin4 suddenly not working - ImportError: cannot import name 'view_commit' |
Date | |
Msg-id | CAM9w-_mQWb+Zrh-+Met6pD44wY3vQAo5MtBJm9gF4WwqnY5C_Q@mail.gmail.com Whole thread Raw |
In response to | pgadmin4 suddenly not working - ImportError: cannot import name 'view_commit' (Ni Ne <nineoften@hotmail.com>) |
List | pgadmin-support |
Hi Ni Ne,
Run - pip uninstall Flask-Security and try starting pgAdmin.
On Thu, Jul 15, 2021 at 12:01 AM Ni Ne <nineoften@hotmail.com> wrote:
Hi Aditya,It was working on 5.3 then stopped. Then I upgraded to 5.4 to try to resolve the issues.Here is the output from 'pip freeze' :# python3 -m pip freezealabaster==0.7.12alembic==1.6.5appdirs==1.4.4astor==0.8.1attrs==21.2.0autoflake==1.4Babel==2.9.1bandit==1.7.0bcrypt==3.2.0bidict==0.21.2black==20.8b1blinker==1.4Brotli==1.0.9certifi==2021.5.30cffi==1.14.5chardet==4.0.0cheroot==8.5.2click==7.1.2coverage==5.5cryptography==3.4.7darglint==1.8.0dataclasses==0.8distlib==0.3.2dnspython==1.16.0doc8==0.8.1docutils==0.17.1email-validator==1.1.3eradicate==1.0eventlet==0.31.0filelock==3.0.12flake8==3.9.2flake8-2020==1.6.0flake8-bandit==2.1.2flake8-broken-line==0.2.1flake8-bugbear==19.8.0flake8-builtins==1.5.3flake8-commas==2.0.0flake8-comprehensions==3.5.0flake8-debugger==3.2.1flake8-docstrings==1.6.0flake8-eradicate==0.4.0flake8-fixme==1.1.1flake8-isort==3.0.1flake8-logging-format==0.6.0flake8-mutable==1.2.0flake8-polyfill==1.0.2flake8-quotes==2.1.2flake8-rst-docstrings==0.0.12flake8-string-format==0.2.3flake8-variables-names==0.0.3Flask==1.1.2Flask-BabelEx==0.9.4Flask-Compress==1.10.1Flask-Gravatar==0.5.0Flask-Login==0.5.0Flask-Mail==0.9.1Flask-Migrate==2.7.0Flask-Paranoid==0.2.0Flask-Principal==0.4.0Flask-Security==3.0.0Flask-Security-Too==4.0.1Flask-SocketIO==5.1.0Flask-SQLAlchemy==2.5.1Flask-WTF==0.15.1gitdb==4.0.7GitPython==3.1.17greenlet==1.1.0httpagentparser==1.9.1idna==2.10imagesize==1.2.0importlib-metadata==4.5.0importlib-resources==5.1.4iniconfig==1.1.1isort==4.3.21itsdangerous==1.1.0jaraco.functools==3.3.0Jinja2==2.11.3ldap2pg==5.5ldap3==2.9Mako==1.1.4MarkupSafe==2.0.1mccabe==0.6.1mod-wsgi==4.7.1more-itertools==8.8.0mypy-extensions==0.4.3packaging==20.9paramiko==2.7.2passlib==1.7.4pathspec==0.8.1pbr==5.6.0pep8-naming==0.9.1pgadmin4==5.4pluggy==0.13.1psutil==5.8.0psycopg2==2.7.7psycopg2-binary==2.8.6py==1.10.0pyasn1==0.4.8pyasn1-modules==0.2.8pycodestyle==2.7.0pycparser==2.20pydocstyle==5.1.1pyflakes==2.3.1Pygments==2.9.0PyNaCl==1.4.0pyparsing==2.4.7pytest==6.2.4pytest-cov==2.12.1python-dateutil==2.8.1python-dev-tools==2020.9.10python-editor==1.0.4python-engineio==4.2.0python-ldap==3.3.1python-socketio==5.3.0pytz==2021.1pyupgrade==2.19.4PyYAML==5.4.1regex==2021.4.4requests==2.25.1restructuredtext-lint==1.3.2simplejson==3.17.2six==1.16.0smmap==4.0.0snowballstemmer==2.1.0speaklater==1.3speaklater3==1.4Sphinx==2.4.4sphinxcontrib-applehelp==1.0.2sphinxcontrib-devhelp==1.0.2sphinxcontrib-htmlhelp==2.0.0sphinxcontrib-jsmath==1.0.1sphinxcontrib-qthelp==1.0.3sphinxcontrib-serializinghtml==1.1.5SQLAlchemy==1.3.24sqlparse==0.4.1sshtunnel==0.4.0stevedore==3.3.0testfixtures==6.17.1tokenize-rt==4.1.0toml==0.10.2tox==3.23.1tox-travis==0.12typed-ast==1.4.3typing-extensions==3.10.0.0ua-parser==0.10.0urllib3==1.26.5user-agents==2.2.0virtualenv==20.4.7wemake-python-styleguide==0.14.1Werkzeug==2.0.1WTForms==2.3.3zipp==3.4.1From: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
Sent: Tuesday, July 13, 2021 11:21 PM
To: Ni Ne <nineoften@hotmail.com>
Cc: pgAdmin Support <pgadmin-support@postgresql.org>
Subject: Re: pgadmin4 suddenly not working - ImportError: cannot import name 'view_commit'Hi,On Mon, Jul 12, 2021 at 10:25 PM Ni Ne <nineoften@hotmail.com> wrote:Hi and thank you for the response. Unfortunately I do not have a requirements.txt file at that location. I do have this one however:/usr/local/lib/python3.6/site-packages/pgadmin4/regression/requirements.txtBut trying to install against that returns this error:python3 -m pip install -r /usr/local/lib/python3.6/site-packages/pgadmin4/regression/requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages/pgadmin4/regression/../../requirements.txt'I am also at the latest published verion of Flask-Security-Too for my platform - 4.0.1.OK. Can you share "pip freeze" on your python virtual env ? From which version did you upgrade to latest version ?Please let me know if there are other things I can try. Thank you!From: Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>
Sent: Sunday, July 11, 2021 10:25 PM
To: Ni Ne <nineoften@hotmail.com>
Cc: pgadmin-support@lists.postgresql.org <pgadmin-support@lists.postgresql.org>
Subject: Re: pgadmin4 suddenly not working - ImportError: cannot import name 'view_commit'Hi Ni Ne,The package - Flask-Security-Too is updated in the recent release. Can you run pip install -r /usr/pgadmin4/web/requirements.txt for your python env ?On Sat, Jul 10, 2021 at 1:20 AM Ni Ne <nineoften@hotmail.com> wrote:pgadmin4 was previously working, logged in this morning and now it's not. Am guessing an automatic yum update went through.I am running CentOS 7, pgadmin4 5.4, Flask 1.1.2
This is the error I am getting in the apache error_log file:mod_wsgi (pid=14087): Failed to exec Python script file '/usr/pgadmin4/web/pgAdmin4.wsgi'.mod_wsgi (pid=14087): Exception occurred processing WSGI script '/usr/pgadmin4/web/pgAdmin4.wsgi'.Traceback (most recent call last):File "/usr/pgadmin4/web/pgAdmin4.wsgi", line 36, in <module>from pgAdmin4 import app as applicationFile "/usr/pgadmin4/web/pgAdmin4.py", line 98, in <module>app = create_app()File "/usr/pgadmin4/web/pgadmin/__init__.py", line 689, in create_appfor module in app.find_submodules('pgadmin'):File "/usr/pgadmin4/web/pgadmin/__init__.py", line 87, in find_submodulesmodule = import_module(module_name)File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "/usr/pgadmin4/web/pgadmin/browser/__init__.py", line 35, in <module>from flask_security.views import _security, view_commit, _ctxImportError: cannot import name 'view_commit'Does anyone have any ideas on how to resolve? Thanks!--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
pgadmin-support by date: