Bug description
I have successfully included the "INCLUDE_CHROMIUM=true" argument in my build. Playwright-Chromium is installed in the final image. However, the worker logs indicate the following error: "AttributeError: 'int' object has no attribute 'isdigit'".
Each worker task returns a relatively similar error: " Traceback (most recent call last): File "/app/.venv/lib/python3.10/site-packages/celery/app/trace.py", line 453, in trace_task R = retval = fun(args, kwargs) File "/app/superset/initialization/init.py", line 144, in call return task_base.call(self, args, kwargs) File "/app/.venv/lib/python3.10/site-packages/celery/app/trace.py", line 736, in protected_call return self.run(*args, kwargs) File "/app/superset/tasks/thumbnails.py", line 51, in cache_chart_thumbnail chart = cast(Slice, Slice.get(chart_id)) File "/app/superset/models/slice.py", line 366, in get qry = db.session.query(Slice).filter_by(id_or_uuid_filter(id_or_uuid)) File "/app/superset/models/slice.py", line 371, in id_or_uuid_filter if id_or_uuid.isdigit(): AttributeError: 'int' object has no attribute 'isdigit' "
Thumbnails and PDF/image exports cannot be carried out
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
18 or greater
Browser
Chrome
Additional context
No response
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] 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.
Comment From: dosubot[bot]
This is a known bug in recent Superset versions: the error happens because Slice.get was using filter_by() with a SQLAlchemy BinaryExpression from id_or_uuid_filter, which expects a string but sometimes receives an int—causing the AttributeError you saw. This was fixed in PR #34769 (merged 2025-08-20), which changes filter_by() to filter() in Slice.get and ensures correct type handling.
To resolve this, upgrade to a Superset version after that date. If you can't upgrade, you can patch your code by replacing filter_by(id_or_uuid_filter(id_or_uuid)) with filter(id_or_uuid_filter(id_or_uuid)) in superset/models/slice.py. This will restore screenshot and thumbnail generation.
You can verify if you have the fix by checking that Slice.get uses filter(), not filter_by(), with id_or_uuid_filter.
Let me know if you need a quick code snippet or more details!
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: Mistuke
I'm still getting this at the docker container made from https://github.com/apache/superset/commit/0fce5ec i.e. https://hub.docker.com/layers/apache/superset/0fce5ec-dev/images/sha256-2404de1f86fd651c6c6715046b397e7ce7df9100cd0404e6082f2aecd2fc398f
File "/app/.venv/lib/python3.10/site-packages/superset/tasks/thumbnails.py", line 51, in cache_chart_thumbnail
chart = cast(Slice, Slice.get(chart_id))
File "/app/.venv/lib/python3.10/site-packages/superset/models/slice.py", line 366, in get
qry = db.session.query(Slice).filter(id_or_uuid_filter(id_or_uuid))
File "/app/.venv/lib/python3.10/site-packages/superset/models/slice.py", line 371, in id_or_uuid_filter
if id_or_uuid.isdigit():
AttributeError: 'int' object has no attribute 'isdigit'
Which is using filter instead of filter_by. So I don't think this is fixed..
Comment From: sadpandajoe
@Mistuke this will probably be part of 6.0.0rc2. If you want to test, i'd pull from master and see if it's working there.
Comment From: Mistuke
@Mistuke this will probably be part of 6.0.0rc2. If you want to test, i'd pull from master and see if it's working there.
@sadpandajoe the commit was from master, specifically https://github.com/apache/superset/commit/0fce5ec and my stack trace contains the "fixed" function names
Comment From: sadpandajoe
@betodealmeida mind taking a quick look at this in case if your PR hasn't fixed the issue.
Comment From: tahvane1
To me it seems that api (cache_chart_thumbnail) has been changed to receive string only, but all calling functionality still uses int. I was able to fix this locally for charts but dashboards still won't display at all for me. Latest from 6.0 branch...
Comment From: tahvane1
Dashboard issue was due to DYNAMIC_PLUGINS not working. I disabled that and dashboards work.