[BUG]: Unnecessary `UserWarning` when using `fig.write_image()` with `kaleido.start_sync_server()`
Maintainers usually reply within 1 day
@jayzhou2309 is already working on this.
Since Oct 2, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- data-visualization
Research direction
Start in plotly/io/_kaleido.py around the kaleido.calc_fig_sync() call at line 185, then trace how fig.write_image() constructs its arguments. Reproduce the example with kaleido.start_sync_server() and confirm that no warning appears when no Kaleido options are supplied, while the existing warning behavior remains for supplied options.
Written by the indexing model from the issue text.
Description
Description
When using kaleido.start_sync_server(), fig.write_image() emits a UserWarning on every call, even though no kopts are specified.
The warning is:
plotly\io\_kaleido.py:185: UserWarning: The kopts argument is ignored if using a server.
img_bytes = kaleido.calc_fig_sync(
The image is generated successfully, but since no kopts are specified, it seems that this warning should not be emitted.
It looks like Plotly passes kopts to kaleido.calc_fig_sync() even when no Kaleido options are specified.
Would it be possible for Plotly to avoid passing kopts when no Kaleido options were specified, or otherwise avoid this warning in this case?
Steps to reproduce
import plotly.express as px
import kaleido
fig = px.line(x=[0, 1], y=[0, 1])
kaleido.start_sync_server()
fig.write_image("a.png") # success, but UserWarning
kaleido.stop_sync_server()
Notes
- plotly 7.1.0
- kaleido 1.4.0
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.9k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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
-
[BUG]: Single-color requests raise ZeroDivisionError in palette helpersPossibly taken @MokiMeow claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
P3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
plotly/plotly.py#5769 · 1 reaction ·
Maintainers usually reply within 1 day
-
Remove `@types/plotly.js` dependencyPossibly taken @Belagum claimed this 27 days ago. OpenP3 size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug P1
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
feature P3
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
All issues in plotly/plotly.py
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws-samples/sample-per-model-bedrock#191 ·
Maintainers usually reply within 1 day
-
Docs viewer: inverted grey colormap, Phantom CT window -20 to 35 HU, smoothing up to 40 mmPossibly taken A pull request linked to this issue is open or already merged. Openarea: docs enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
PyTomography/PyTomography#331 ·
Maintainers usually reply within 1 day
-
effort: low prio: low ready
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
digitalfabrik/integreat-cms#4616 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
FuRongJun-1999/dsh-memory#226 · 1 comment ·
Maintainers usually reply within 1 day
-
bug difficulty:2 good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MakazhanAlpamys/Soup#1865 ·
Maintainers usually reply within 1 day