Skip to content

Data error Error: deque mutated during iteration #40903

@Wetbikeboy2500

Description

@Wetbikeboy2500

Bug description

I pulled the latest master and started to get these chart errors. Prior to pulling in the commits for around the past month, I never saw errors like these. After pulling the last month of commits and doing a quick run locally, I am occasionally seeing these errors for charts.

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.12

Node version

18 or greater

Browser

Chrome

Additional context

Dev Docker Compose build

2026-06-09 07:19:23.882 | 2026-06-09 11:19:23,882:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:23] "GET /api/v1/dashboard/1/charts HTTP/1.1" 200 -
2026-06-09 07:19:23.913 | 2026-06-09 11:19:23,913:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:23] "GET /api/v1/dashboard/1?q=(columns:!(id,slug,url,dashboard_title,published,css,theme,json_metadata,position_json,certified_by,certification_details,changed_by_name,changed_by,changed_on,created_by,charts,owners,roles,tags,changed_on_delta_humanized,created_on_delta_humanized,is_managed_externally,uuid)) HTTP/1.1" 200 -
2026-06-09 07:19:23.988 | 2026-06-09 11:19:23,988:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:23] "GET /api/v1/dashboard/1/datasets HTTP/1.1" 200 -
2026-06-09 07:19:24.668 | 2026-06-09 11:19:24,668:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:24] "GET /api/v1/dashboard/favorite_status/?q=!(1) HTTP/1.1" 200 -
2026-06-09 07:19:24.729 | 2026-06-09 11:19:24,728:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:24] "GET /api/v1/report/?q=(filters:!((col:dashboard_id,opr:eq,value:1),(col:creation_method,opr:eq,value:dashboards),(col:created_by,opr:rel_o_m,value:1))) HTTP/1.1" 200 -
2026-06-09 07:19:25.488 | 2026-06-09 11:19:25,488:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:25] "GET /api/v1/dataset/13/drill_info/?q=(dashboard_id:1) HTTP/1.1" 200 -
2026-06-09 07:19:25.503 | 2026-06-09 11:19:25,502:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:25] "GET /api/v1/dataset/3/drill_info/?q=(dashboard_id:1) HTTP/1.1" 200 -
2026-06-09 07:19:25.517 | 2026-06-09 11:19:25,516:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:25] "GET /api/v1/dataset/6/drill_info/?q=(dashboard_id:1) HTTP/1.1" 200 -
2026-06-09 07:19:25.752 | 2026-06-09 11:19:25,567:WARNING:superset.models.helpers:Query SELECT DATE_TRUNC('week', order_date) AS order_date, deal_size AS deal_size, sum(sales) AS "SUM(sales)"
2026-06-09 07:19:25.752 | FROM public.cleaned_sales_data GROUP BY DATE_TRUNC('week', order_date), deal_size ORDER BY "SUM(sales)" DESC
2026-06-09 07:19:25.752 | LIMIT 10000 on schema public failed
2026-06-09 07:19:25.752 | Traceback (most recent call last):
2026-06-09 07:19:25.752 | File "/app/superset/models/helpers.py", line 1523, in query
2026-06-09 07:19:25.752 | df = self.database.get_df(
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/superset/models/core.py", line 822, in get_df
2026-06-09 07:19:25.752 | cursor, rows, description = self._execute_sql_with_mutation_and_logging(
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/superset/models/core.py", line 758, in _execute_sql_with_mutation_and_logging
2026-06-09 07:19:25.752 | with self.get_raw_connection(catalog=catalog, schema=schema) as conn:
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2026-06-09 07:19:25.752 | return next(self.gen)
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/superset/models/core.py", line 647, in get_raw_connection
2026-06-09 07:19:25.752 | with closing(engine.raw_connection()) as conn:
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3404, in raw_connection
2026-06-09 07:19:25.752 | return self._wrap_pool_connect(self.pool.connect, _connection)
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
2026-06-09 07:19:25.752 | return fn()
2026-06-09 07:19:25.752 | ^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 327, in connect
2026-06-09 07:19:25.752 | return _ConnectionFairy._checkout(self)
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
2026-06-09 07:19:25.752 | fairy = _ConnectionRecord.checkout(pool)
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
2026-06-09 07:19:25.752 | rec = pool._do_get()
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2026-06-09 07:19:25.752 | return self._create_connection()
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
2026-06-09 07:19:25.752 | return _ConnectionRecord(self)
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388, in init
2026-06-09 07:19:25.752 | self.__connect()
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 704, in __connect
2026-06-09 07:19:25.752 | )._exec_w_sync_on_first_run(self.dbapi_connection, self)
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 332, in _exec_w_sync_on_first_run
2026-06-09 07:19:25.752 | self(args, **kw)
2026-06-09 07:19:25.752 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 345, in call
2026-06-09 07:19:25.752 | for fn in self.listeners:
2026-06-09 07:19:25.752 | ^^^^^^^^^^^^^^
2026-06-09 07:19:25.752 | RuntimeError: deque mutated during iteration
2026-06-09 07:19:25.768 | 2026-06-09 11:19:25,680:WARNING:superset.models.helpers:Query SELECT DATE_TRUNC('month', order_date) AS order_date, COUNT(
) AS count
2026-06-09 07:19:25.768 | FROM public.cleaned_sales_data GROUP BY DATE_TRUNC('month', order_date)
2026-06-09 07:19:25.768 | LIMIT 50000 on schema public failed
2026-06-09 07:19:25.768 | Traceback (most recent call last):
2026-06-09 07:19:25.768 | File "/app/superset/models/helpers.py", line 1523, in query
2026-06-09 07:19:25.768 | df = self.database.get_df(
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/superset/models/core.py", line 822, in get_df
2026-06-09 07:19:25.768 | cursor, rows, description = self._execute_sql_with_mutation_and_logging(
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/superset/models/core.py", line 758, in _execute_sql_with_mutation_and_logging
2026-06-09 07:19:25.768 | with self.get_raw_connection(catalog=catalog, schema=schema) as conn:
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2026-06-09 07:19:25.768 | return next(self.gen)
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/superset/models/core.py", line 647, in get_raw_connection
2026-06-09 07:19:25.768 | with closing(engine.raw_connection()) as conn:
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3404, in raw_connection
2026-06-09 07:19:25.768 | return self._wrap_pool_connect(self.pool.connect, _connection)
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
2026-06-09 07:19:25.768 | return fn()
2026-06-09 07:19:25.768 | ^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 327, in connect
2026-06-09 07:19:25.768 | return _ConnectionFairy._checkout(self)
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
2026-06-09 07:19:25.768 | fairy = _ConnectionRecord.checkout(pool)
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
2026-06-09 07:19:25.768 | rec = pool._do_get()
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2026-06-09 07:19:25.768 | return self._create_connection()
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
2026-06-09 07:19:25.768 | return _ConnectionRecord(self)
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388, in init
2026-06-09 07:19:25.768 | self.__connect()
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 704, in __connect
2026-06-09 07:19:25.768 | )._exec_w_sync_on_first_run(self.dbapi_connection, self)
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 338, in _exec_w_sync_on_first_run
2026-06-09 07:19:25.768 | self(args, **kw)
2026-06-09 07:19:25.768 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 345, in call
2026-06-09 07:19:25.768 | for fn in self.listeners:
2026-06-09 07:19:25.768 | ^^^^^^^^^^^^^^
2026-06-09 07:19:25.768 | RuntimeError: deque mutated during iteration
2026-06-09 07:19:25.830 | 2026-06-09 11:19:25,829:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:25] "POST /api/v1/chart/data?form_data={"slice_id":19}&dashboard_id=1 HTTP/1.1" 400 -
2026-06-09 07:19:25.834 | 2026-06-09 11:19:25,833:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:25] "POST /api/v1/chart/data?form_data={"slice_id":11}&dashboard_id=1 HTTP/1.1" 400 -
2026-06-09 07:19:25.983 | 2026-06-09 11:19:25,983:WARNING:py.warnings:/app/superset/utils/pandas_postprocessing/aggregate.py:46: FutureWarning: The provided callable <function mean at 0x74968a30d580> is currently using SeriesGroupBy.mean. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "mean" instead.
2026-06-09 07:19:25.983 | return df_groupby.agg(**aggregate_funcs).reset_index(drop=not groupby)
2026-06-09 07:19:25.983 |
2026-06-09 07:19:25.989 | 2026-06-09 11:19:25,989:WARNING:py.warnings:/app/superset/utils/pandas_postprocessing/aggregate.py:46: FutureWarning: The provided callable <function median at 0x749689db20c0> is currently using SeriesGroupBy.median. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string "median" instead.
2026-06-09 07:19:25.990 | return df_groupby.agg(**aggregate_funcs).reset_index(drop=not groupby)
2026-06-09 07:19:25.990 |
2026-06-09 07:19:26.189 | 2026-06-09 11:19:26,189:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:26] "POST /api/v1/chart/data?form_data={"slice_id":12}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:26.229 | 2026-06-09 11:19:26,229:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:26] "POST /api/v1/chart/data?form_data={"slice_id":4}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:26.369 | 2026-06-09 11:19:26,368:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:26] "POST /api/v1/chart/data?form_data={"slice_id":13}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:26.398 | 2026-06-09 11:19:26,398:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:26] "POST /api/v1/chart/data?form_data={"slice_id":23}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:26.556 | 2026-06-09 11:19:26,555:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:26] "POST /api/v1/chart/data?form_data={"slice_id":5}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:26.769 | 2026-06-09 11:19:26,769:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:26] "POST /api/v1/chart/data?form_data={"slice_id":9}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:26.808 | 2026-06-09 11:19:26,807:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:26] "POST /api/v1/chart/data?form_data={"slice_id":17}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.005 | 2026-06-09 11:19:27,004:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":15}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.077 | 2026-06-09 11:19:27,076:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":21}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.171 | 2026-06-09 11:19:27,171:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":8}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.310 | 2026-06-09 11:19:27,310:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":3}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.370 | 2026-06-09 11:19:27,360:WARNING:superset.models.helpers:Query SELECT product_line AS product_line, COUNT(
) AS count, AVG(price_each) AS "AVG(price_each)", AVG(sales) AS "AVG(sales)"
2026-06-09 07:19:27.370 | FROM public.cleaned_sales_data GROUP BY product_line ORDER BY count DESC
2026-06-09 07:19:27.370 | LIMIT 10 on schema public failed
2026-06-09 07:19:27.370 | Traceback (most recent call last):
2026-06-09 07:19:27.370 | File "/app/superset/models/helpers.py", line 1523, in query
2026-06-09 07:19:27.370 | df = self.database.get_df(
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/superset/models/core.py", line 822, in get_df
2026-06-09 07:19:27.370 | cursor, rows, description = self._execute_sql_with_mutation_and_logging(
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/superset/models/core.py", line 758, in _execute_sql_with_mutation_and_logging
2026-06-09 07:19:27.370 | with self.get_raw_connection(catalog=catalog, schema=schema) as conn:
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2026-06-09 07:19:27.370 | return next(self.gen)
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/superset/models/core.py", line 647, in get_raw_connection
2026-06-09 07:19:27.370 | with closing(engine.raw_connection()) as conn:
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3404, in raw_connection
2026-06-09 07:19:27.370 | return self._wrap_pool_connect(self.pool.connect, _connection)
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
2026-06-09 07:19:27.370 | return fn()
2026-06-09 07:19:27.370 | ^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 327, in connect
2026-06-09 07:19:27.370 | return _ConnectionFairy._checkout(self)
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
2026-06-09 07:19:27.370 | fairy = _ConnectionRecord.checkout(pool)
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
2026-06-09 07:19:27.370 | rec = pool._do_get()
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2026-06-09 07:19:27.370 | return self._create_connection()
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
2026-06-09 07:19:27.370 | return _ConnectionRecord(self)
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388, in init
2026-06-09 07:19:27.370 | self.__connect()
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 704, in __connect
2026-06-09 07:19:27.370 | )._exec_w_sync_on_first_run(self.dbapi_connection, self)
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 338, in _exec_w_sync_on_first_run
2026-06-09 07:19:27.370 | self(args, **kw)
2026-06-09 07:19:27.370 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 345, in call
2026-06-09 07:19:27.370 | for fn in self.listeners:
2026-06-09 07:19:27.370 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.370 | RuntimeError: deque mutated during iteration
2026-06-09 07:19:27.433 | 2026-06-09 11:19:27,433:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":25}&dashboard_id=1 HTTP/1.1" 400 -
2026-06-09 07:19:27.453 | 2026-06-09 11:19:27,437:WARNING:superset.models.helpers:Query SELECT DATE_TRUNC('day', order_date) AS order_date, deal_size AS deal_size, COUNT(
) AS count
2026-06-09 07:19:27.453 | FROM public.cleaned_sales_data GROUP BY DATE_TRUNC('day', order_date), deal_size ORDER BY count DESC
2026-06-09 07:19:27.453 | LIMIT 10000 on schema public failed
2026-06-09 07:19:27.453 | Traceback (most recent call last):
2026-06-09 07:19:27.453 | File "/app/superset/models/helpers.py", line 1523, in query
2026-06-09 07:19:27.453 | df = self.database.get_df(
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/superset/models/core.py", line 822, in get_df
2026-06-09 07:19:27.453 | cursor, rows, description = self._execute_sql_with_mutation_and_logging(
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/superset/models/core.py", line 758, in _execute_sql_with_mutation_and_logging
2026-06-09 07:19:27.453 | with self.get_raw_connection(catalog=catalog, schema=schema) as conn:
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2026-06-09 07:19:27.453 | return next(self.gen)
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/superset/models/core.py", line 647, in get_raw_connection
2026-06-09 07:19:27.453 | with closing(engine.raw_connection()) as conn:
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3404, in raw_connection
2026-06-09 07:19:27.453 | return self._wrap_pool_connect(self.pool.connect, _connection)
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
2026-06-09 07:19:27.453 | return fn()
2026-06-09 07:19:27.453 | ^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 327, in connect
2026-06-09 07:19:27.453 | return _ConnectionFairy._checkout(self)
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
2026-06-09 07:19:27.453 | fairy = _ConnectionRecord.checkout(pool)
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
2026-06-09 07:19:27.453 | rec = pool._do_get()
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2026-06-09 07:19:27.453 | return self._create_connection()
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
2026-06-09 07:19:27.453 | return _ConnectionRecord(self)
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388, in init
2026-06-09 07:19:27.453 | self.__connect()
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 704, in __connect
2026-06-09 07:19:27.453 | )._exec_w_sync_on_first_run(self.dbapi_connection, self)
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 338, in _exec_w_sync_on_first_run
2026-06-09 07:19:27.453 | self(args, **kw)
2026-06-09 07:19:27.453 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 345, in call
2026-06-09 07:19:27.453 | for fn in self.listeners:
2026-06-09 07:19:27.453 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.453 | RuntimeError: deque mutated during iteration
2026-06-09 07:19:27.492 | 2026-06-09 11:19:27,491:WARNING:superset.common.query_object:The field groupby is deprecated, please use columns instead.
2026-06-09 07:19:27.492 | 2026-06-09 11:19:27,491:WARNING:superset.common.query_object:The field columns is already populated, replacing value with contents from groupby.
2026-06-09 07:19:27.508 | 2026-06-09 11:19:27,507:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":10}&dashboard_id=1 HTTP/1.1" 400 -
2026-06-09 07:19:27.534 | 2026-06-09 11:19:27,534:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":22}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.698 | 2026-06-09 11:19:27,686:WARNING:superset.models.helpers:Query SELECT year AS year, product_line AS product_line, COUNT(
) AS count
2026-06-09 07:19:27.698 | FROM public.cleaned_sales_data GROUP BY year, product_line
2026-06-09 07:19:27.698 | LIMIT 10000 on schema public failed
2026-06-09 07:19:27.698 | Traceback (most recent call last):
2026-06-09 07:19:27.698 | File "/app/superset/models/helpers.py", line 1523, in query
2026-06-09 07:19:27.698 | df = self.database.get_df(
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/superset/models/core.py", line 822, in get_df
2026-06-09 07:19:27.698 | cursor, rows, description = self._execute_sql_with_mutation_and_logging(
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/superset/models/core.py", line 758, in _execute_sql_with_mutation_and_logging
2026-06-09 07:19:27.698 | with self.get_raw_connection(catalog=catalog, schema=schema) as conn:
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2026-06-09 07:19:27.698 | return next(self.gen)
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/superset/models/core.py", line 647, in get_raw_connection
2026-06-09 07:19:27.698 | with closing(engine.raw_connection()) as conn:
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3404, in raw_connection
2026-06-09 07:19:27.698 | return self._wrap_pool_connect(self.pool.connect, _connection)
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
2026-06-09 07:19:27.698 | return fn()
2026-06-09 07:19:27.698 | ^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 327, in connect
2026-06-09 07:19:27.698 | return _ConnectionFairy._checkout(self)
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
2026-06-09 07:19:27.698 | fairy = _ConnectionRecord.checkout(pool)
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
2026-06-09 07:19:27.698 | rec = pool._do_get()
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2026-06-09 07:19:27.698 | return self._create_connection()
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
2026-06-09 07:19:27.698 | return _ConnectionRecord(self)
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388, in init
2026-06-09 07:19:27.698 | self.__connect()
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 704, in __connect
2026-06-09 07:19:27.698 | )._exec_w_sync_on_first_run(self.dbapi_connection, self)
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 338, in _exec_w_sync_on_first_run
2026-06-09 07:19:27.698 | self(*args, **kw)
2026-06-09 07:19:27.698 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 345, in call
2026-06-09 07:19:27.698 | for fn in self.listeners:
2026-06-09 07:19:27.698 | ^^^^^^^^^^^^^^
2026-06-09 07:19:27.698 | RuntimeError: deque mutated during iteration
2026-06-09 07:19:27.703 | 2026-06-09 11:19:27,687:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":2}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.805 | 2026-06-09 11:19:27,804:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":1}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:27.806 | 2026-06-09 11:19:27,805:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:27] "POST /api/v1/chart/data?form_data={"slice_id":7}&dashboard_id=1 HTTP/1.1" 400 -
2026-06-09 07:19:28.065 | 2026-06-09 11:19:28,064:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:28] "POST /api/v1/chart/data?form_data={"slice_id":16}&dashboard_id=1 HTTP/1.1" 200 -
2026-06-09 07:19:28.087 | 2026-06-09 11:19:28,071:WARNING:superset.models.helpers:Query SELECT DATE_TRUNC('quarter', order_date) AS order_date, sum(sales) AS "SUM(sales)"
2026-06-09 07:19:28.087 | FROM public.cleaned_sales_data GROUP BY DATE_TRUNC('quarter', order_date) ORDER BY order_date ASC
2026-06-09 07:19:28.087 | LIMIT 10000 on schema public failed
2026-06-09 07:19:28.087 | Traceback (most recent call last):
2026-06-09 07:19:28.087 | File "/app/superset/models/helpers.py", line 1523, in query
2026-06-09 07:19:28.087 | df = self.database.get_df(
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/superset/models/core.py", line 822, in get_df
2026-06-09 07:19:28.087 | cursor, rows, description = self._execute_sql_with_mutation_and_logging(
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/superset/models/core.py", line 758, in _execute_sql_with_mutation_and_logging
2026-06-09 07:19:28.087 | with self.get_raw_connection(catalog=catalog, schema=schema) as conn:
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
2026-06-09 07:19:28.087 | return next(self.gen)
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/superset/models/core.py", line 647, in get_raw_connection
2026-06-09 07:19:28.087 | with closing(engine.raw_connection()) as conn:
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3404, in raw_connection
2026-06-09 07:19:28.087 | return self._wrap_pool_connect(self.pool.connect, _connection)
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
2026-06-09 07:19:28.087 | return fn()
2026-06-09 07:19:28.087 | ^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 327, in connect
2026-06-09 07:19:28.087 | return _ConnectionFairy._checkout(self)
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
2026-06-09 07:19:28.087 | fairy = _ConnectionRecord.checkout(pool)
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
2026-06-09 07:19:28.087 | rec = pool._do_get()
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
2026-06-09 07:19:28.087 | return self._create_connection()
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
2026-06-09 07:19:28.087 | return _ConnectionRecord(self)
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 388, in init
2026-06-09 07:19:28.087 | self.__connect()
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 704, in __connect
2026-06-09 07:19:28.087 | )._exec_w_sync_on_first_run(self.dbapi_connection, self)
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 338, in _exec_w_sync_on_first_run
2026-06-09 07:19:28.087 | self(*args, **kw)
2026-06-09 07:19:28.087 | File "/app/.venv/lib/python3.12/site-packages/sqlalchemy/event/attr.py", line 345, in call
2026-06-09 07:19:28.087 | for fn in self.listeners:
2026-06-09 07:19:28.087 | ^^^^^^^^^^^^^^
2026-06-09 07:19:28.087 | RuntimeError: deque mutated during iteration
2026-06-09 07:19:28.158 | 2026-06-09 11:19:28,158:INFO:werkzeug:172.18.0.1 - - [09/Jun/2026 11:19:28] "POST /api/v1/chart/data?form_data={"slice_id":24}&dashboard_id=1 HTTP/1.1" 400 -

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    #bug:regressionBugs that are identified as regessions

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions