Skip to content

add_vline fails in batch mode #4742

Open

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions