Skip to content

Commit 8d1e862

Browse files
authored
195 windows 11 pyroll run gets stuck in an endless loop due to problems with kaleido package (#206)
* added warning for Windows users that, when using plotly a certain kaleido version is required * added platform dependent installation of kaleido when installing pyroll-core[plotly] * minor formatting corrections
1 parent 6137368 commit 8d1e862

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ matplotlib = [
5252
plotly = [
5353
"plotly ~= 5.18",
5454
"pandas ~= 2.0",
55-
"kaleido"
55+
"kaleido; platform_system != 'Windows'",
56+
"kaleido == 0.1.0.post1; platform_system == 'Windows'"
5657
]
5758

5859
[project.urls]

pyroll/core/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,24 @@
3434
)
3535

3636
# determine available plotting backend, plotly is preferred
37+
38+
import platform
39+
3740
try:
3841
import plotly as _
3942
PLOTTING_BACKEND = "plotly"
4043

44+
try:
45+
import kaleido
46+
try:
47+
if platform.system() == 'Windows':
48+
if kaleido.__version__ != '0.1.0.post1':
49+
raise ValueError("Kaleido Version 0.1.0.post1 is required to use plotly on Windows machines")
50+
except AttributeError:
51+
pass
52+
except ImportError:
53+
print("The kaleido package is required if plotly is to be used")
54+
4155
except ImportError:
4256
try:
4357
import matplotlib as _

0 commit comments

Comments
 (0)