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
ImportError: cannot import name 'StatsdStatsLogger' from 'superset.stats_logger' (/app/superset/stats_logger.py) #28391
Comments
It looks like the issue you're encountering with the pip install statsd This step is crucial because the Additionally, verify that your Docker environment is correctly configured to communicate with the If after ensuring the
|
I think the If there's not much outcry about something broken here, then it's probably a configuration problem rather than a bug, so we might be forced to migrate this to a Discussion rather than an Issue. |
Looks like you're in docker-compose. To repro/debug you can $ docker-compose exec superset bash
root@4625ad55f961:/app# python
Python 3.10.14 (main, Apr 24 2024, 07:50:19) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from superset.stats_logger import StatsdStatsLogger
>>> This works for me as is on latest master. The comment from the error message you provided above seems generic but probably captures the issue:
|
Just checked and I was able to configure |
Sounds like it's a config issue, not a bug. I'll close this for now, but I'm happy to move it to a Q&A Discussion if you'd like. Just say the word :) |
Thank you all for your comments/answers. I tried connecting to the docker container and ran the above commands:
I am getting the same error. I am not sure what is wrong in my config file or in my env vars file. Let me try configuring this statsd in our kubernetes pod as the configuration style is helm based and is different from docker compose. If it works in kubernetes then we can skip this in docker compose as we want to get this working finally in kubernetes. |
I just tried importing
Not sure how can statsd be a problem in importing here. |
I think I am able to avoid this issue. If others also run in to this issue then though try switching the version of statsd and retry. |
If we know for sure that certain versions of a lib work or don't work, we should set that range here: https://github.com/apache/superset/blob/master/pyproject.toml#L196 |
Bug description
This ticket reports the same issue that was reported in #21067 and which was closed as stale.
We are trying to uptake the superset statsd logging capability as mentioned in the document: https://superset.apache.org/docs/configuration/event-logging/#statsd-logging
But we are running into below error while starting the superset docker container:
Superset version - v4.0.0
Superset instance - On docker
statsd==3.3.0
python-statsd==2.1.0
How to reproduce the bug
Screenshots/recordings
No response
Superset version
4.0.0
Python version
3.10
Node version
Not applicable
Browser
Not applicable
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: