#1834·E2B

Python chart deserializer raises ValueError for an unrecognized chart type

Author: claxmanCreated Sep 7, 2026Updated Sep 7, 2026
LabelsbugsdkCode Interpreter

_deserialize_chart({"type": "not-a-chart", "title": "x", "elements": []}) raises ValueError: 'not-a-chart' is not a valid ChartType (code-interpreter-python venv, no sandbox). Same call with "unknown" returns ChartType.UNKNOWN. JS deserializeChart's default branch falls back to ChartType.UNKNOWN. PointChart already catches ValueError to use ScaleType.UNKNOWN.