-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag' #20723
Comments
A hack to get around it:
If there's one thing you can reply on with a superset release is dodgy pip deps. |
Duplicate of #20717. |
I just installed Superset 2.0.0 from scratch and wasn't able to replicate this issue unfortunately. |
Did you test this on Ubuntu 22.04? |
I tested this within a Docker container and on Mac OS X. It's unclear to me why Ubuntu would be playing a role here, or what am I missing? The packages installed are all the same on any *nix operating system :) |
I'm just the Ubuntu messenger. I cannot speak for Mac. I recommend trying to install on a fresh Ubuntu 22.04 using pip install and you'll see the problems. It comes with python 3.10, and this results in a failure based on a couple of problematic deps (see below). Even when I install python 3.9 alongside, I get the error described above. In order to overcome ALL issues I encountered I need to perform:
The above needs to be done before the Just reporting as I see it based on a fresh install of Ubuntu 22.04 (with all system updates applied). Issues re markupsafe, and 3.10 failure (it results in an error when building the pyarrow pkg) have been reported elsewhere on this message board. |
It happends only in LXC containers and python 3.9 installations |
can confirm it is indeed happening inside my LXC 20.04 container python is 3.8.10 with latest pip |
I ran into a similar issue trying @dat-linux 's workaround, and also had to downgrade Flask - downgrading to Flask 2.1.0 seemed to fix things. (I also downgraded markup safe / Werkzeug as they suggested - did not try tweaking anything else) |
@eogren Yes, Flask is now also creating a problem. Which version of Flask did you fall back to? |
@dat-linux I installed Flask == 2.1.0 |
Seems like Do note that production Superset installations should use pinned dependencies based on: https://github.com/apache/superset/blob/master/requirements/base.txt |
We are all installing Superset via pip! |
@dpgaspar thanks a lot for pointing that out! Was facing the same problem. Running 1.5.0, upgrading to 2.0.0. My solution was:
This After that I could move forward with applying db migrations successfully :) |
Would it be a good idea to use constraints like Airflow does, considering that there a quite a lot of optional extra requires in Superset which do not need to be installed? I'm not sure if any of the dependencies for the extra requires are actually currently included in the Just thinking out loud. |
Install still fails on platforms that have Python 3.10 by default (ie Ubuntu 22.04). |
That is not exactly related to the original issue. Python 3.10 support is in a different issue: #21002 |
Well, the original issue was found due to an attempt to install Superset on Ubuntu 22.04. |
I made a variant of the command @WesleyBatista made, since the one he shared creates a file which isn't necessary:
|
i then get an error while installing Werzeug 2.0.3 and further during superset db upgrade |
@trimat1 , I couldn't get 22.04 to work whatsoever.. python 3.10 has some breaking changes in the dependencies superset uses.. I backed down to 20.04 and did this routine to get setup, remove the
|
Hi @EMCP ,
this is whats was needed (hopefully). |
I get this when I tried your options
|
I also face this problem when I test 2.0.1RC1. @srinify I follow above steps
yongjie.zhao@:tmp$ mkvirtualenv release
created virtual environment CPython3.8.6.final.0-64 in 482ms
creator CPython3Posix(dest=/Users/yongjie.zhao/.virtualenvs/release, clear=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/yongjie.zhao/Library/Application Support/virtualenv)
added seed packages: pip==22.2.2, setuptools==65.3.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
virtualenvwrapper.user_scripts creating /Users/yongjie.zhao/.virtualenvs/release/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/yongjie.zhao/.virtualenvs/release/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/yongjie.zhao/.virtualenvs/release/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/yongjie.zhao/.virtualenvs/release/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/yongjie.zhao/.virtualenvs/release/bin/get_env_details
(release) yongjie.zhao@:tmp$ wget -c https://dist.apache.org/repos/dist/dev/superset/2.0.1rc1/apache-superset-2.0.1rc1-source.tar.gz
--2022-10-08 14:08:32-- https://dist.apache.org/repos/dist/dev/superset/2.0.1rc1/apache-superset-2.0.1rc1-source.tar.gz
Resolving dist.apache.org (dist.apache.org)... 13.90.137.153
Connecting to dist.apache.org (dist.apache.org)|13.90.137.153|:443... connected.
HTTP request sent, awaiting response... 200 OK
(release) yongjie.zhao@:tmp$ superset db upgrade
--------------------------------------------------------------------------------
WARNING
--------------------------------------------------------------------------------
A Default SECRET_KEY was detected, please use superset_config.py to override it.
Use a strong complex alphanumeric string and use a tool to help you generate
a sufficiently random sequence, ex: openssl rand -base64 42
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
logging was configured successfully
2022-10-08 14:16:48,961:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-10-08 14:16:48,968:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2022-10-08 14:16:48,971:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2022-10-08 14:16:48,974:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
Failed to create app
Traceback (most recent call last):
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/app.py", line 37, in create_app
app_initializer.init_app()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 460, in init_app
self.init_app_in_ctx()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 409, in init_app_in_ctx
self.configure_url_map_converters()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 508, in configure_url_map_converters
from superset.utils.url_map_converters import (
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/utils/url_map_converters.py", line 21, in <module>
from superset.models.tags import ObjectTypes
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/models/__init__.py", line 17, in <module>
from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/models/core.py", line 63, in <module>
from superset.utils import cache as cache_util, core as utils
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/utils/cache.py", line 28, in <module>
from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
2022-10-08 14:16:49,065:ERROR:superset.app:Failed to create app
Traceback (most recent call last):
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/app.py", line 37, in create_app
app_initializer.init_app()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 460, in init_app
self.init_app_in_ctx()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 409, in init_app_in_ctx
self.configure_url_map_converters()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 508, in configure_url_map_converters
from superset.utils.url_map_converters import (
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/utils/url_map_converters.py", line 21, in <module>
from superset.models.tags import ObjectTypes
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/models/__init__.py", line 17, in <module>
from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/models/core.py", line 63, in <module>
from superset.utils import cache as cache_util, core as utils
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/utils/cache.py", line 28, in <module>
from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
Traceback (most recent call last):
File "/Users/yongjie.zhao/.virtualenvs/release/bin/superset", line 8, in <module>
sys.exit(superset())
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/click/core.py", line 1654, in invoke
super().invoke(ctx)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/flask/cli.py", line 354, in decorator
app = __ctx.ensure_object(ScriptInfo).load_app()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/flask/cli.py", line 308, in load_app
app = locate_app(import_name, name)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/flask/cli.py", line 237, in locate_app
return find_app_by_string(module, app_name)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/flask/cli.py", line 165, in find_app_by_string
app = attr(*args, **kwargs)
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/app.py", line 44, in create_app
raise ex
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/app.py", line 37, in create_app
app_initializer.init_app()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 460, in init_app
self.init_app_in_ctx()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 409, in init_app_in_ctx
self.configure_url_map_converters()
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/initialization/__init__.py", line 508, in configure_url_map_converters
from superset.utils.url_map_converters import (
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/utils/url_map_converters.py", line 21, in <module>
from superset.models.tags import ObjectTypes
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/models/__init__.py", line 17, in <module>
from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/models/core.py", line 63, in <module>
from superset.utils import cache as cache_util, core as utils
File "/Users/yongjie.zhao/.virtualenvs/release/lib/python3.8/site-packages/superset/utils/cache.py", line 28, in <module>
from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag' |
Fixed as per the above commit. |
I got the same result..... |
Solved problem with flask==2.1.0 WTForms==2.3.0 Werkzeug==2.0.3 |
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag' #20723
How to reproduce the bug
Install using pip on Ubuntu with python 3.9
Get to this point as per instructions:
$HOME/venv/superset/2.0.0/bin/superset db upgrade
Expected results
No error
Actual results
The text was updated successfully, but these errors were encountered: