add_vline fails in batch mode
未关闭
还没有人认领这个 Issue。
bug
P3
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
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)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先从 batch_update 上下文和 add_vline 示例开始,然后检查 plotly/basedatatypes.py 第 3995 行附近。将失败的批处理模式路径与正常工作的直接调用进行比较,并使用报告中的版本重现 TypeError。完成标准是 add_vline 在 fig.batch_update() 内正常工作且不会引发异常,同时保留现有的直接调用行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- plotly, python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100