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

Superset install pulls in werkzeug 1.0 which has changed paths for imports, breaking the intsall #9110

Closed
3 tasks done
johnseekins opened this issue Feb 10, 2020 · 8 comments

Comments

@johnseekins
Copy link

A clear and concise description of what the bug is.

Expected results

Superset runs

Actual results

Traceback (most recent call last):
  File "/datto/monitoring/superset/.pyenv/versions/3.6.8/bin/superset", line 21, in <module>
    from superset.cli import create_app
  File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/superset/__init__.py", line 27, in <module>
    from flask_appbuilder import AppBuilder, IndexView, SQLA
  File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/flask_appbuilder/__init__.py", line 5, in <module>
    from .api import ModelRestApi  # noqa: F401
  File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/flask_appbuilder/api/__init__.py", line 10, in <module>
    from flask_babel import lazy_gettext as _
  File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/flask_babel/__init__.py", line 19, in <module>
    from werkzeug import ImmutableDict
ImportError: cannot import name 'ImmutableDict'

root@use1-hadoop-16:/datto/monitoring/superset# /datto/monitoring/superset/.pyenv/versions/3.6.8/bin/superset init
Traceback (most recent call last):
File "/datto/monitoring/superset/.pyenv/versions/3.6.8/bin/superset", line 21, in
from superset.cli import create_app
File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/superset/init.py", line 27, in
from flask_appbuilder import AppBuilder, IndexView, SQLA
File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/flask_appbuilder/init.py", line 5, in
from .api import ModelRestApi # noqa: F401
File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/flask_appbuilder/api/init.py", line 10, in
from flask_babel import lazy_gettext as _
File "/datto/monitoring/superset/.pyenv/versions/3.6.8/lib/python3.6/site-packages/flask_babel/init.py", line 19, in
from werkzeug import ImmutableDict
ImportError: cannot import name 'ImmutableDict'

How to reproduce the bug

  1. Install superset per regular instructions: pip3 install apache-superset
  2. attempt to run a superset command

Environment

  • superset version: 0.35.2
  • python version: 3.6.8
  • node.js version: ? (not installed as this is a binary install)
  • npm version: ? (not installed as this is a binary install)

Checklist

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 there are 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.
@johnseekins
Copy link
Author

pip3 uninstall werkzeug
pip3 install werkzeug==0.16.1

Fixed the problem.

@nytai
Copy link
Member

nytai commented Feb 10, 2020

supersets requirements specifies werkzeug==0.16.1 https://github.com/apache/incubator-superset/blob/master/requirements.txt#L82

This issue appears related to your environment.

@johnseekins
Copy link
Author

It must be, yeah. Strange that just pip3 install apache-superset wouldn't pull the correct requirements.txt. Well...never mind then!

@villebro villebro reopened this Feb 10, 2020
@villebro
Copy link
Member

Werkzeug actually isn't restricted in setup.py, which means that pip install apache-superset pulls in the latest stable version. I noticed that airflow hit a similar problem with werkzeug this weekend, so superset also needs to either restrict the version or accommodate to the 1.0 version. I can look i to fixing this if needed.

@johnseekins
Copy link
Author

I mean...docs indicate that pip3 install apache-airflow is the correct way to install latest stable, so it may be worth fixing.

@villebro
Copy link
Member

villebro commented Feb 11, 2020

@dpgaspar looking more closely at the stacktrace, it seems FAB is pulling in Flask-Babel<1.0, which pulls in an unpinned version of werkzeug but actually depends on werkzeug<1.0. As this has been fixed in Flask-Babel==1.0.0 which was released last week, I think the cleanest solution would be bump Flask-Babel>=1.0.0 in FAB if it doesn't introduce any other problems.

@dpgaspar
Copy link
Member

Yes, totally agree @villebro, I'll do that test and release

@dpgaspar dpgaspar mentioned this issue Feb 11, 2020
12 tasks
@dpgaspar
Copy link
Member

Fixed with #9117

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

Successfully merging a pull request may close this issue.

4 participants