Skip to content
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

Superset application logs are full of warnings: WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped #26020

Open
fabioselau077 opened this issue Nov 18, 2023 · 8 comments

Comments

@fabioselau077
Copy link

Hello, my problem is exactly the same as the one reported on stackoverflow, after installing I had a problem that after logging in it redirected to the login screen again, I checked the logs and it was about CSRF, I commented out some lines in the config file and now after logging in I have the error "WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped", but I haven't found any solution yet.

@sfirke
Copy link
Member

sfirke commented Nov 28, 2023

The loop redirecting to the login screen with a CSRF error is discussed and addressed in #24579.

The warning you note is a warning, not an error, and has been present in my Superset logs since at least 2.0.0 without causing any performance problems. That said, it clutters the logs and confuses people who are troubleshooting (like this case). I'm going to retitle this issue and leave it open until someone closes it by resolving the werkzeug.local.LocalProxy warning message.

@sfirke sfirke changed the title Error 'werkzeug.local.LocalProxy' is not mapped" in Ubuntu EC2 Superset application logs are full of warnings: WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped Nov 28, 2023
@justmike1
Copy link
Contributor

can we suppress those warnings?

@rusackas
Copy link
Member

cc @craig-rueda and @dpgaspar to see if either of them know how to either resolve or suppress the warning.

@andy-clapson
Copy link
Contributor

this might not be the solution you're going for, but the warnings module in stdlib is pretty effective for tuning out warnings from 3rd party packages: https://docs.python.org/3/library/warnings.html

@byeonghyun-kim
Copy link

byeonghyun-kim commented May 23, 2024

OK, this issue may be less concerned, but I faced this issue and I think I figured it out.
Anyhow, I wrote down RATELIMIT_STORAGE_URI option in my superset_config.py file, and the warning doesn't pop out anymore.
I use Redis as my backend, so I wrote the option like this:
RATELIMIT_STORAGE_URI = 'redis://{REDIS_HOST}:{REDIS_PORT}'
And voila, the warning is gone.

In code side, there's a empty dict value _event_logger at superset/superset/extensions/init.py . Below the variable,
event_logger variable gets LocalProxy of Werkzeug, and if _event_logger stays as empty dict, event_logger LocalProxy get nothing from .get method, and I think that's why this warning pops up. (Just my theory though)

And for the record, I am using Superset 4.0.1 self-hosted!

@daringliu
Copy link

daringliu commented May 23, 2024 via email

@daringliu
Copy link

daringliu commented May 23, 2024 via email

@Habeeb556
Copy link

++ #29403

I’ve already configured this, but the warning persists.

RATELIMIT_STORAGE_URI = f"redis://{REDIS_HOST}:{REDIS_PORT}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants