Python chart deserializer raises ValueError for an unrecognized chart type
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.9k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 70
Description
_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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Python _deserialize_chart entry point and compare its handling of unrecognized types with the JS deserializeChart default branch and PointChart's ValueError fallback. Done means an unrecognized chart type resolves to ChartType.UNKNOWN instead of raising ValueError, while the existing "unknown" behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100