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