question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flask Admin is broken by Werkzeug 1.0.0

See original GitHub issue

Apologizes if this is wrong place to post this, but using pipenv and depending on the latest version of flask-admin, we get this.

Traceback (most recent call last):
  File "run_www.py", line 4, in <module>
    from www.entry import app
  File "/app/www/entry.py", line 110, in <module>
    import www.views.admin  # noqa
  File "/app/www/views/admin.py", line 5, in <module>
    from flask_admin.contrib.sqla import ModelView
  File "/usr/local/lib/python3.8/site-packages/flask_admin/contrib/sqla/__init__.py", line 2, in <module>
    from .view import ModelView
  File "/usr/local/lib/python3.8/site-packages/flask_admin/contrib/sqla/view.py", line 19, in <module>
    from flask_admin.model import BaseModelView
  File "/usr/local/lib/python3.8/site-packages/flask_admin/model/__init__.py", line 2, in <module>
    from .base import BaseModelView
  File "/usr/local/lib/python3.8/site-packages/flask_admin/model/base.py", line 8, in <module>
    from werkzeug import secure_filename
ImportError: cannot import name 'secure_filename' from 'werkzeug' (/usr/local/lib/python3.8/site-packages/werkzeug/__init__.py)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
rrcc0044commented, Feb 7, 2020

I tried downgrading werkzeug==0.16.1 and it worked

3reactions
mrjoescommented, Feb 7, 2020

We’re back in action.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Functionality — flask-admin 1.6.0 documentation
It only covers specific case when all but one primary keys are foreign keys to another model. For example, model inheritance following this...
Read more >
Flask-Admin and Blueprint factory pattern is giving werkzeug ...
The error is caused by you setting index_view to a ModelView subclass. Don't do that. Normally, index_view is set to an instance of...
Read more >
Changes — Werkzeug Documentation (2.2.x)
Fixed a bug that occurs when running on Python 2.6 and using a broken locale. See pull request #912. Fixed a crash when...
Read more >
Flask-Admin documentation - Read the Docs
The first step is to initialize an empty admin interface for your Flask app: from flask import Flask from flask_admin import Admin.
Read more >
werkzeug - HackTricks
Werkzeug Console PIN Exploit · username is the user who started this Flask · modname is flask. · getattr(app, '__name__', getattr (app ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found