add_vline fails in batch mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
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)
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 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.
Assessment
- Tech stack
- plotly, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100