Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask Admin Incompatible With Modern Flask ( >=2.3) #2400

Open
mwheeler1982 opened this issue Nov 30, 2023 · 1 comment
Open

Flask Admin Incompatible With Modern Flask ( >=2.3) #2400

mwheeler1982 opened this issue Nov 30, 2023 · 1 comment

Comments

@mwheeler1982
Copy link

I get the following error message when trying to start flask-admin . Based on my research, it looks like this has been broken since Flask 2.3. It looks like warnings were introduced in 2.2.0 that it was deprecated, then officially removed in 2.3.0 .

See here: https://flask.palletsprojects.com/en/3.0.x/changes/#version-2-3-0 and here: pallets/flask#4692 .

Traceback (most recent call last):
File "/Users/user/venv/flask-admin-test/test.py", line 4, in
app = AdminApp()
File "/Users/user/venv/flask-admin-test/lib/python3.9/site-packages/flask-admin-test/app.py", line 129, in init
self.init_flask_app()
File "/Users/user/venv/flask-admin-test/lib/python3.9/site-packages/flask-admin-test/app.py", line 300, in init_flask_app
from flask.json import JSONEncoder
ImportError: cannot import name 'JSONEncoder' from 'flask.json' (/Users/user/venv/flask-admin-test/lib/python3.9/site-packages/flask/json/init.py)

@mwheeler1982 mwheeler1982 changed the title Flask Admin Incompatible With Modern Flask Flask Admin Incompatible With Modern Flask ( >=2.3) Nov 30, 2023
@maxnoe
Copy link

maxnoe commented Dec 11, 2023

@mwheeler1982 The error is in your app code, not in flask-admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants