<p dir="auto"><em>ModuleNotFoundError: No module named 'werkzeug.wrappers.etag' <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1306025055" data-permission-text="Title is private" data-url="https://github.com/apache/superset/issues/20723" data-hovercard-type="issue" data-hovercard-url="/apache/superset/issues/20723/hovercard" href="https://github.com/apache/superset/issues/20723">#20723</a></em></p>
<h4 dir="auto">How to reproduce the bug</h4>
<p dir="auto">Install using pip on Ubuntu with python 3.9</p>
<p dir="auto">Get to this point as per instructions:</p>
<p dir="auto"><code class="notranslate">$HOME/venv/superset/2.0.0/bin/superset db upgrade</code></p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">No error</p>
<h3 dir="auto">Actual results</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="logging was configured successfully
2022-07-15 15:10:24,707:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-07-15 15:10:24,713:INFO:root:Configured event logger of type &lt;class 'superset.utils.log.DBEventLogger'&gt;
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-07-15 15:10:24,716: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-07-15 15:10:24,720: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 &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/app.py&quot;, line 37, in create_app
    app_initializer.init_app()
  File &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/initialization/__init__.py&quot;, line 460, in init_app
    self.init_app_in_ctx()
  File &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/initialization/__init__.py&quot;, line 409, in init_app_in_ctx
    self.configure_url_map_converters()
  File &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/initialization/__init__.py&quot;, line 508, in configure_url_map_converters
    from superset.utils.url_map_converters import (
  File &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/utils/url_map_converters.py&quot;, line 21, in &lt;module&gt;
    from superset.models.tags import ObjectTypes
  File &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/models/__init__.py&quot;, line 17, in &lt;module&gt;
    from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
  File &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/models/core.py&quot;, line 63, in &lt;module&gt;
    from superset.utils import cache as cache_util, core as utils
  File &quot;$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/utils/cache.py&quot;, line 28, in &lt;module&gt;
    from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'"><pre class="notranslate"><code class="notranslate">logging was configured successfully
2022-07-15 15:10:24,707:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-07-15 15:10:24,713:INFO:root:Configured event logger of type &lt;class 'superset.utils.log.DBEventLogger'&gt;
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-07-15 15:10:24,716: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-07-15 15:10:24,720: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 "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/app.py", line 37, in create_app
    app_initializer.init_app()
  File "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/initialization/__init__.py", line 460, in init_app
    self.init_app_in_ctx()
  File "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/initialization/__init__.py", line 409, in init_app_in_ctx
    self.configure_url_map_converters()
  File "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/initialization/__init__.py", line 508, in configure_url_map_converters
    from superset.utils.url_map_converters import (
  File "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/utils/url_map_converters.py", line 21, in &lt;module&gt;
    from superset.models.tags import ObjectTypes
  File "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/models/__init__.py", line 17, in &lt;module&gt;
    from . import core, datasource_access_request, dynamic_plugins, sql_lab, user_attributes
  File "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/models/core.py", line 63, in &lt;module&gt;
    from superset.utils import cache as cache_util, core as utils
  File "$HOME/venv/superset/2.0.0/lib/python3.9/site-packages/superset/utils/cache.py", line 28, in &lt;module&gt;
    from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
</code></pre></div>
<p dir="auto">I installed Superset 2.0.0 via pip. I get the following error when running <code class="notranslate">superset</code> after installation:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ superset
...
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'"><pre class="notranslate">$ <span class="pl-s1">superset</span>
<span class="pl-c1">...</span>
<span class="pl-c1">ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'</span></pre></div>
<h4 dir="auto">How to reproduce the bug</h4>
<p dir="auto">I installed Superset via pip in a clean Python 3.8 virtual environment on Linux:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ mkdir superset-2.0.0
$ cd superset-2.0.0
$ python3.8 -m venv venv
$ source ./venv/bin/activate
$ pip install --upgrade setuptools pip wheel
$ pip install apache-superset==2.0.0
$ pip install pillow mysqlclient gevent
$ vim superset_config.py
$ export PYTHONPATH=/home/superset/superset-2.0.0
$ export FLASK_APP=superset
$ superset
...
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'"><pre class="notranslate">$ <span class="pl-s1">mkdir superset-2.0.0</span>
$ <span class="pl-s1"><span class="pl-c1">cd</span> superset-2.0.0</span>
$ <span class="pl-s1">python3.8 -m venv venv</span>
$ <span class="pl-s1"><span class="pl-c1">source</span> ./venv/bin/activate</span>
$ <span class="pl-s1">pip install --upgrade setuptools pip wheel</span>
$ <span class="pl-s1">pip install apache-superset==2.0.0</span>
$ <span class="pl-s1">pip install pillow mysqlclient gevent</span>
$ <span class="pl-s1">vim superset_config.py</span>
$ <span class="pl-s1"><span class="pl-k">export</span> PYTHONPATH=/home/superset/superset-2.0.0</span>
$ <span class="pl-s1"><span class="pl-k">export</span> FLASK_APP=superset</span>
$ <span class="pl-s1">superset</span>
<span class="pl-c1">...</span>
<span class="pl-c1">ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'</span></pre></div>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Superset runs without error.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">Superset crashes with Python <code class="notranslate">ModuleNotFoundError</code>.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>superset version: Superset 2.0.0</li>
<li>python version: Python 3.8.10</li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">I notice that <code class="notranslate">requirements/base.txt</code> lists <code class="notranslate">werkzeug==2.0.3</code> so I installed that manually and superset runs fine after.</p>