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

ArrowInvalid when return a PyDataFrame to python #66

Open
sun-rs opened this issue Feb 1, 2024 · 2 comments
Open

ArrowInvalid when return a PyDataFrame to python #66

sun-rs opened this issue Feb 1, 2024 · 2 comments

Comments

@sun-rs
Copy link

sun-rs commented Feb 1, 2024

After update polars to 0.37 and pyo3-polars to 0.11.1, I find there would be an error when return PyResult<PyDataFrame> to Python:

thread '<unnamed>' panicked at /Users/sun/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-polars-0.11.1/src/lib.rs:169:49:
called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'pyarrow.lib.ArrowInvalid'>, value: ArrowInvalid("Invalid or unsupported format string: 'vu'"), traceback: Some(<traceback object at 0x1032dfcc0>) }

My code works fine with polars 0.36 and pyo3-polars 0.10.0, and I have run cargo clean and delete cargo.lock. I print the DataFrame in rust side which is below:
WX20240201-174527@2x

I find no "vu" in the df.

@jshinonome
Copy link

I have a similar issue. I think it is related to the new string/binary series type, as they are no longer generic pyarrow data types.

E       pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'pyarrow.lib.ArrowInvalid'>, value: ArrowInvalid("Invalid or unsupported format string: 'vu'"), traceback: Some(<traceback object at 0x7f329c07c340>) }

panic at this line

let arg = to_py_array(arr, py, pyarrow).unwrap();

@jshinonome
Copy link

This issue seems to be fixed.

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

No branches or pull requests

2 participants