Comments (1)
The warning "Class 'werkzeug.local.LocalProxy' is not mapped" in your logs while using Superset version 4.0.1 with Python 3.11 is likely due to the use of LocalProxy
objects in the Superset code. This warning typically occurs when SQLAlchemy or another ORM tool tries to map or interact with a class that it doesn't recognize as a mapped entity.
In the superset/__init__.py
file, LocalProxy
is used to create proxies for various configurations and caches:
from werkzeug.local import LocalProxy
conf = LocalProxy(lambda: current_app.config)
results_backend = LocalProxy(lambda: results_backend_manager.results_backend)
results_backend_use_msgpack = LocalProxy(lambda: results_backend_manager.should_use_msgpack)
data_cache = LocalProxy(lambda: cache_manager.data_cache)
thumbnail_cache = LocalProxy(lambda: cache_manager.thumbnail_cache)
To resolve this warning, you can ensure that these LocalProxy
objects are not being inadvertently passed to SQLAlchemy or any other ORM that expects a mapped class. If these proxies are being used in a context where they might be interpreted as entities, you might need to refactor the code to avoid such usage.
For example, you can access the actual object behind the proxy before passing it to SQLAlchemy:
# Instead of passing the proxy directly, access the underlying object
actual_results_backend = results_backend._get_current_object()
# Use actual_results_backend in your ORM operations
This approach ensures that the ORM interacts with the actual object rather than the proxy, thus avoiding the warning [1].
Additionally, there has been a recent update in the Superset codebase that addresses this warning. The update is mentioned in the CHANGELOG/4.0.0.md
file under the version 4.0.0 section:
- [#27164](https://github.com/apache/superset/pull/27164) fix: unlock and bump werkzeug (@dpgaspar)
This update includes changes that address the warning related to werkzeug.local.LocalProxy
[2][3].
To continue talking to Dosu, mention @dosu.
from superset.
Related Issues (20)
- Horizontal bar chart legend padding & sort order regression in 4.0.2rc2 HOT 3
- Exception: Unable to execute 'ecpg', you likely need to install it.' HOT 2
- The row limit set for the chart was reached. HOT 13
- Download to CSV shows a special characters in Arabic HOT 7
- ChartWarmUpCacheCommand still use legacy filter scopes HOT 3
- Superset API import dataset without SSH Tunnel not working ? HOT 1
- Unable to detect valid SELECT statement HOT 1
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd4 in position 6: invalid continuation byte HOT 12
- Tags on content do not get displayed in consistent order HOT 3
- Webpack build runs regardless of BUILD_SUPERSET_FRONTEND_IN_DOCKER cited in docker compose documentation HOT 2
- SQL with inline comment starting with `--` fails in dashboards `view query` and sqllab HOT 3
- Sequential color scheme for skewed data
- DATA URIs are stripped from href attribute HOT 2
- Stop button for queries doesn't work in SQL Lab HOT 1
- SQL Lab - Save button doesn't change its size based on label length HOT 1
- Chart Editor - Impossible to translate Time Grain dropdown contents HOT 1
- Chart Editor (Radar Chart) - Impossible to translate Label Position dropdown contents HOT 1
- Slack Notification - deprecated API HOT 7
- SQL LAB - unexpected error HOT 6
- Database Issue when using mariadb 10.4, illegal mixx HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superset.