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 #194

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

setDaemon() Deprecation warning for to_image #194

huonw opened this issue Apr 30, 2024 · 4 comments
Assignees
Labels
active bug something broken P2 needed for current cycle

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 #171, this can probably be resolved by doing a new release of Kaleido to PyPI & conda, since #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!

@Coding-with-Adam Coding-with-Adam added the bug something broken label May 3, 2024
@gvwilson gvwilson transferred this issue from plotly/plotly.py Jul 11, 2024
@gvwilson
Copy link
Collaborator

Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson

@gvwilson gvwilson self-assigned this Jul 26, 2024
@gvwilson gvwilson removed their assignment Aug 3, 2024
@gvwilson gvwilson added the P2 needed for current cycle label Aug 14, 2024
@thijssnelleman
Copy link

Any update on this issue?

@jkittner
Copy link

This seems to be a duplicate of #171 and was resolved by #146

@ayjayt
Copy link
Collaborator

ayjayt commented Nov 12, 2024

Hi everyone, I'll add this to my watch. I think the new major release is coming around tomorrow. We're doing our best to squash all bugs and improve debugging before that release.

The new release of kaleido is a bit different because for many reasons, but majorly, it no longer bundles chrome.

@ayjayt ayjayt self-assigned this Nov 12, 2024
@ayjayt ayjayt added the active label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active bug something broken P2 needed for current cycle
Projects
None yet
Development

No branches or pull requests

6 participants