e2b-dev / e2b-dev/E2B

Python chart deserializer raises ValueError for an unrecognized chart type

Open Beginner friendly
#1,834 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Code Interpreter sdk
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.