add_vline fails in batch mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- plotly, python
- Domain
- data-visualization
Research direction
Start with the batch_update context and add_vline example, then inspect plotly/basedatatypes.py around line 3995. Compare the failing batch-mode path with the working direct call and reproduce the TypeError using the versions in the report. Done means add_vline works inside fig.batch_update() without raising while preserving the existing direct-call behavior.
Written by the indexing model from the issue text.
Description
I am using plotly 5.24.0 with python 3.10.12 in a vs-code interactive window.
The following example raises TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str' in [...]/site-packages/plotly/basedatatypes.py:3995
import plotly.graph_objects as go
fig = go.Figure()
with fig.batch_update():
fig.add_vline(1)
The same example without batch mode works fine:
import plotly.graph_objects as go
fig = go.Figure()
fig.add_vline(1)
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
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.
More from plotly/plotly.py
-
P3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug P1
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
All issues in plotly/plotly.py
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100