Summary: | dev-db/pgadmin4-4.17-r1 with dev-python/flask-security-3.4.4 - pgAdmin4: ImportError: cannot import name '_render_json' from 'flask_security.views' (/usr/lib/python3.7/site-packages/flask_security/views.py) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | George Tarasov <george.v.tarasov> |
Component: | Current packages | Assignee: | PgSQL Bugs <pgsql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kripton |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 755260 | ||
Bug Blocks: | |||
Attachments: |
Goran's patch
ebuild patch ebuild patch |
Description
George Tarasov
2020-09-22 19:46:10 UTC
I have the same issue with starting pgAdmin4. I found the similar (although not identical) issue on OpenSuse forum https://forums.opensuse.org/showthread.php/539523-pgAdmin4-startet-nicht-mehr?p=2930160#post2930160 pgAdmin4 uses calss to the _render_json that doesn't exist in my version of the the /usr/lib/python3.7/site-packages/flask_security/views.py file. The value in pgAdmin4 is _render_json and the views.py has the value default_render_json. I managed to get my pgAdmin4 working by adding the "default" prefix to the _render_json on two places: diff /usr/share/pgadmin4/web/pgadmin/browser/__init__.py /tmp/new.py 32c32 < from flask_security.views import _security, _commit, _render_json, _ctx --- > from flask_security.views import _security, _commit, default_render_json, _ctx 948c948 < return _render_json(form) --- > return default_render_json(form) I hope this helps. Created attachment 662314 [details, diff]
Goran's patch
Created attachment 662317 [details, diff]
ebuild patch
Worked for me! Thanks! While the new versions of pgadmin4 have not yet been stabilized, i'm attaching the following patches for temporary error workaround. pgadmin4-4.17-flask-security-3.3.0-render-json.patch: Goran's patch pgadmin4-4.17-r1.patch: ebuild patch Created attachment 662320 [details, diff]
ebuild patch
Does the issue persist with 4.26? (In reply to Aaron W. Swenson from comment #6) > Does the issue persist with 4.26? No! It works as expected. I experienced the same and I can confirm that upgrading to pgadmin4-4.26 fixed the issue. Could you stabilize it (along with the dependencies)? Thanks! (In reply to George Tarasov from comment #7) > (In reply to Aaron W. Swenson from comment #6) > > Does the issue persist with 4.26? > > No! > It works as expected. (In reply to jannis from comment #8) > I experienced the same and I can confirm that upgrading to pgadmin4-4.26 > fixed the issue. Could you stabilize it (along with the dependencies)? > Thanks! Thanks for follow up! The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f997bdc5009d9b7b78b57ddf1494867268eaca13 commit f997bdc5009d9b7b78b57ddf1494867268eaca13 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2020-12-25 03:16:08 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2020-12-25 03:16:08 +0000 dev-db/pgadmin4: Cleanup Closes: https://bugs.gentoo.org/735014 Closes: https://bugs.gentoo.org/744151 Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org> dev-db/pgadmin4/Manifest | 3 - .../pgadmin4/files/pgadmin4-4.17-python-3.8.patch | 12 -- dev-db/pgadmin4/pgadmin4-4.17-r1.ebuild | 120 ------------------- dev-db/pgadmin4/pgadmin4-4.25.ebuild | 124 -------------------- dev-db/pgadmin4/pgadmin4-4.28.ebuild | 130 --------------------- 5 files changed, 389 deletions(-) |