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

Bug: Numpy version issue causes Jupyter notebook kernel crash when outputting results as Pandas #3761

Closed
Tracked by #3666
prrao87 opened this issue Jul 5, 2024 · 0 comments · Fixed by #3839
Closed
Tracked by #3666
Assignees
Labels
bug Something isn't working

Comments

@prrao87
Copy link
Member

prrao87 commented Jul 5, 2024

Kùzu version

v0.4.2

What operating system are you using?

macOS Sonoma 14.5

What happened?

When I use Python 3.12 and try to run the get_as_df() method in a Jupyter notebook cell, I get the following error where the kernel dies.

image

On debugging this further with @mxwli, we found that it's related to a numpy version issue.

The moment I run this command pip install numpy~=1.26, the get_as_df() method works.

We should probably find a way to solve this issue without the user having to manually manage their numpy version that's older than current Pandas versions require.

Are there known steps to reproduce?

Run the attached notebook. The CSV file has this schema:

id,name,age
p1,Lisa,25
p2,James,28
p3,Carol,32
p4,David,31

The query run is below:

res = conn.execute(
    """
    LOAD FROM 'data/person.csv' (header = true)
    RETURN id, name, CAST(age, "INT64") AS age
    """
    )
print(res.get_as_df())

test.ipynb.zip

@prrao87 prrao87 added the bug Something isn't working label Jul 5, 2024
@prrao87 prrao87 changed the title Bug: Kùzu and Pandas on Python causes kernel crash in Jupyter notebook Bug: Numpy version issue causes Jupyter notebook kernel crash when outputting results as Pandas Jul 5, 2024
@andyfengHKU andyfengHKU mentioned this issue Jul 10, 2024
81 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants