Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG]: Unnecessary `UserWarning` when using `fig.write_image()` with `kaleido.start_sync_server()`

Open Beginner friendly
#5,786 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@jayzhou2309 is already working on this.

Since Oct 2, 2026.

  • #5787 by @jayzhou2309 — open
  • #5809 by @ioseba — open

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

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

bug P3 size: 1
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from plotly/plotly.py

All issues in plotly/plotly.py

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.