Skip to content

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

Closed

Description

@fabioselau077

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.

Activity

  1. sfirke commented on Nov 28, 2023

    @sfirke
    Member

    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.

  2. 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[/+] on Nov 28, 2023
  3. justmike1 commented on Dec 3, 2023

    @justmike1
    Contributor

    can we suppress those warnings?

  4. rusackas commented on Apr 19, 2024

    @rusackas
    Member

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

  5. andy-clapson commented on May 13, 2024

    @andy-clapson
    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

  6. byeonghyun-kim commented on May 23, 2024

    @byeonghyun-kim

    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!

  7. daringliu commented on May 23, 2024

    @daringliu
  8. daringliu commented on May 23, 2024

    @daringliu
  9. Habeeb556 commented on Aug 9, 2024

    @Habeeb556
    Contributor

    ++ #29403

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

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

  10. andy-clapson commented on Dec 10, 2024

    @andy-clapson
    Contributor

    this may help some folks: #29403 (comment)

  11. rusackas commented on Apr 29, 2025

    @rusackas
    Member

    PR merged that should address this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions