Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setDaemon() Deprecation warning for to_image #4590

Open
huonw opened this issue Apr 30, 2024 · 0 comments
Open

setDaemon() Deprecation warning for to_image #4590

huonw opened this issue Apr 30, 2024 · 0 comments

Comments

@huonw
Copy link

huonw commented Apr 30, 2024

If one executes to_image with Python 3.10 or greater, there is deprecation warning about setDaemon:

from plotly.graph_objs import Figure
Figure().to_image()
.../.venv/lib/python3.10/site-packages/kaleido/scopes/base.py:188: DeprecationWarning:

setDaemon() is deprecated, set the daemon attribute instead

This appears when warnings are enabled, such as python -W default ... or running tests under pytest.

All-in-one reproducer:

# do it all in a temporary directory/venv
cd $(mktemp -d)
python3.10 -m venv .venv

# install all dependencies
.venv/bin/python -m pip install kaleido==0.2.1 plotly==5.21.0 tenacity==8.2.3 packaging==24.0

# BUG: run to_image, with warnings enabled:
.venv/bin/python -W default -c 'from plotly.graph_objs import Figure; Figure().to_image()'
# DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead

Based on plotly/Kaleido#171, this can probably be resolved by doing a new release of Kaleido to PyPI & conda, since plotly/Kaleido#146 appears to fix it in the unreleased code on the master branch.

Alternatively, if Kaleido is unmaintained (and thus may stop working with future Python versions), maybe Plotly.py needs to support another engine?

Thanks for Plotly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants