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

[Python] Segmentation Fault when used with plotly.graph_objects #43037

Closed
tafia opened this issue Jun 25, 2024 · 4 comments
Closed

[Python] Segmentation Fault when used with plotly.graph_objects #43037

tafia opened this issue Jun 25, 2024 · 4 comments

Comments

@tafia
Copy link

tafia commented Jun 25, 2024

Describe the bug, including details regarding any error messages, version, and platform.

The following code produces a segmentation fault with

plotly==5.22.0
polars==0.20.31
pyarrow==16.1.0

Downgrading pyarrow to 15.0.0 (or using plotly.express) works.

from datetime import date, timedelta
import polars as pl
import plotly.graph_objects as go


df = pl.DataFrame(
    {
        "date": [date.today() + timedelta(i) for i in range(200)],
        "a": [float(i) ** 0.5 for i in range(200)],
    }
)

fig = go.Figure()
fig.add_trace(go.Scatter(x=df["date"], y=df["a"], name="a"))

Component(s)

Python

@tafia
Copy link
Author

tafia commented Jun 25, 2024

I understand that there are many libraries at play here but downgrading pyarrow to 15.0.0 seems to make it work so I suppose the root cause lies on pyarrow side.

@tafia
Copy link
Author

tafia commented Jun 25, 2024

Also opened an issue on polars side:
pola-rs/polars#17171

@jorisvandenbossche
Copy link
Member

From reading the polars issue, is this a problem on their side with numpy 2.0?

I assume the reason this gets "fixed" by downgrading to pyarrow 15.0 is that this forces to install numpy < 2

@jorisvandenbossche jorisvandenbossche changed the title Segmentation Fault when used with plotly.graph_objects [Python] Segmentation Fault when used with plotly.graph_objects Jun 25, 2024
@tafia
Copy link
Author

tafia commented Jun 26, 2024

Yes very likely.
Sorry for the noise.

@tafia tafia closed this as completed Jun 26, 2024
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