You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
How to reproduce the bug
Noting
Screenshots/recordings
No response
Superset version
4.0.1
Python version
3.11
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist
I have searched Superset docs and Slack and didn't find a solution to my problem.
I have searched the GitHub issue tracker and didn't find a similar bug report.
I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
The text was updated successfully, but these errors were encountered:
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:
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 objectactual_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].
Bug description
I got the below error in logs:
How to reproduce the bug
Noting
Screenshots/recordings
No response
Superset version
4.0.1
Python version
3.11
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: