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.

ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'

See original GitHub issue

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

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 <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-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 <module>
    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 <module>
    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 <module>
    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 <module>
    from werkzeug.wrappers.etag import ETagResponseMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:25 (5 by maintainers)

github_iconTop GitHub Comments

15reactions
dat-linuxcommented, Jul 15, 2022

A hack to get around it:

python3 -m pip uninstall -y Werkzeug
python3 -m pip install Werkzeug==2.0.3

If there’s one thing you can reply on with a superset release is dodgy pip deps.

10reactions
WesleyBatistacommented, Aug 20, 2022

@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:

wget -O- https://raw.githubusercontent.com/apache/superset/2.0.0/requirements/base.txt | tail -n +10 > superset_requirements.txt
pip install apache-superset==2.0.0 -r superset_requirements.txt

This requirements/base.txt assumes a development environment (considering the -e file:. in there), and that was causing conflicts with my installation setup. tail in my command is to skip those lines.

After that I could move forward with applying db migrations successfully 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Superset installation issues - Stack Overflow
One relating to the Werkzeug module: ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'. A second related to a Flask environmental ...
Read more >
No module named 'werkzeug.wrappers.etag' - Leo ... - 博客园
在进行初始化Supetset数据库:superset db upgrade命令时报错:ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
Read more >
ImportError: No module named 'werkzeug.wrappers.json'
This is a bug that got introduce into Flask and worked its way into Airflow and one of our Docker images. You'll need...
Read more >
No module named 'werkzeug.wrappers.json' - 네오가 필요해
... ModuleNotFoundError: No module named 'werkzeug.wrappers.json'; 'werkzeug.wrappers' is not a package Process finished with exit code.
Read more >
Werkzeug - PyPI
A test client for simulating HTTP requests during testing without requiring ... from werkzeug.wrappers import Request, Response @Request.application def ...
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