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.

ImportError: No module named 'flask.exthook'

See original GitHub issue

Hello ! I ran into an error while running superset db upgrade :

File "/usr/local/bin/superset", line 9, in <module>
    from flask.exthook import ExtDeprecationWarning
ImportError: No module named 'flask.exthook'

For what I can see, superset uses (or can use) flask==1.0 (https://github.com/apache/incubator-superset/blob/master/setup.py#L58) that no longer has a exthook module (https://github.com/pallets/flask/releases/tag/1.0). This causes a ImportError on superset here : https://github.com/apache/incubator-superset/blob/master/superset/bin/superset#L9

When I install flask==0.12.2 before I install superset I no longer have the Error.

Maybe flask<1.0.0 would work better? Or do you think I may be doing something wrong ?

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven’t found one similar

Superset version

0.25.2

Expected results

There should be no error

Actual results

ImportError is raised

Steps to reproduce

pip install superset==0.25.2 (by the way, at this point we get a warning flask-appbuilder 1.10.0 has requirement Flask<0.12.99,>=0.12.1, but you'll have flask 1.0 which is incompatible.) pip freeze

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
xrmxcommented, May 16, 2018

You should probably open a PR fixing the issue 😃

1reaction
mistercrunchcommented, May 16, 2018

Ooops, my bad, fixing in 0.25.4 (pushing this out now)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: No module named 'flask.exthook' · Issue #5006
Hello ! I ran into an error while running superset db upgrade : File "/usr/local/bin/superset", line 9, in from flask.exthook import ...
Read more >
python - Importing flask.ext raises ModuleNotFoundError
Something in your code, or in code you're using, is trying to import flask.ext or flask.exthook , which no longer exists in Flask...
Read more >
ImportError: No module named flask.ext.bcrypt : PY-26398
I created a Python project with the interpreter pointing to a virtual environment where I've installed Flask. When I try to run the...
Read more >
ImportError: No module named flask - M220P
I have tried to follow the other topics regarding (no module named flask), but still cannot figure this out. Below is the error...
Read more >
I'm just starting to learn Flask and I need some help.
... import Form File "C:\Python34\lib\site-packages\flask\exthook.py", line 87, ... module named %s' % fullname) ImportError: No module named flask.ext.wtf.
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