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

ImportError: No module named 'flask.exthook' #5006

Closed
JulieRossi opened this issue May 15, 2018 · 5 comments
Closed

ImportError: No module named 'flask.exthook' #5006

JulieRossi opened this issue May 15, 2018 · 5 comments

Comments

@JulieRossi
Copy link
Contributor

@JulieRossi JulieRossi commented May 15, 2018

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

@xrmx

This comment has been minimized.

Copy link
Contributor

@xrmx xrmx commented May 15, 2018

Dup of #4953, please close

@JulieRossi

This comment has been minimized.

Copy link
Contributor Author

@JulieRossi JulieRossi commented May 16, 2018

Indeed, it mentions the same issue but the discussion says the exthook ImportError is fixed in superset v0.25.1 by forcing flask<1.0 (#4953 (comment)) but actually, in superset v0.25.1, the setup forces flask<=1.0, hence the version 1.0 in installed.
In #4953 they now talk about EncryptedType ImportError.
Should I still close this issue and talk about it in #4953 ?

@xrmx

This comment has been minimized.

Copy link
Contributor

@xrmx xrmx commented May 16, 2018

You should probably open a PR fixing the issue :)

@mistercrunch

This comment has been minimized.

Copy link
Member

@mistercrunch mistercrunch commented May 16, 2018

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

@JulieRossi

This comment has been minimized.

Copy link
Contributor Author

@JulieRossi JulieRossi commented May 17, 2018

Thanks !!

@JulieRossi JulieRossi closed this May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.