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

python31xPackages.polars is broken #263799

Closed
bcdarwin opened this issue Oct 27, 2023 · 5 comments
Closed

python31xPackages.polars is broken #263799

bcdarwin opened this issue Oct 27, 2023 · 5 comments
Labels
0.kind: bug Something is broken

Comments

@bcdarwin
Copy link
Member

bcdarwin commented Oct 27, 2023

Describe the bug

The python31xPackages.polars are completely broken [update: on x86 NixOS/non-NixOS Linux, no idea about aarch64 or Darwin] seemingly due to some sort of shared library issue. Unfortunately the tests aren't enabled so they didn't catch this.

According to git bisect, this breakage occured in 799fff8 from PR #243324.

@happysalada

Steps To Reproduce

Already very suspicious:

$ nix-shell -I nixpkgs=~/nixpkgs -p 'python310.withPackages(ps: with ps; [ polars ])' --pure --command 'python3 -c "import polars as pl"'
/nix/store/pfk7rv72dx8cgdh8qn19x308pbaj3qv5-python3-3.10.12-env/lib/python3.10/site-packages/polars/utils/build_info.py:5: UserWarning: polars binary missing!
  from polars.utils.polars_version import get_polars_version

Total breakage:

$ nix-shell -I nixpkgs=~/nixpkgs -p 'python310.withPackages(ps: with ps; [ polars ])' --pure --command 'python3 -c "import polars as pl; pl.read_csv(\"/tmp/existent-or-nonexistent.csv\")"'
/nix/store/pfk7rv72dx8cgdh8qn19x308pbaj3qv5-python3-3.10.12-env/lib/python3.10/site-packages/polars/utils/build_info.py:5: UserWarning: polars binary missing!
  from polars.utils.polars_version import get_polars_version
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/nix/store/pfk7rv72dx8cgdh8qn19x308pbaj3qv5-python3-3.10.12-env/lib/python3.10/site-packages/polars/io/csv/functions.py", line 354, in read_csv
    df = pl.DataFrame._read_csv(
  File "/nix/store/pfk7rv72dx8cgdh8qn19x308pbaj3qv5-python3-3.10.12-env/lib/python3.10/site-packages/polars/dataframe/frame.py", line 766, in _read_csv
    self._df = PyDataFrame.read_csv(
NameError: name 'PyDataFrame' is not defined. Did you mean: 'DataFrame'?

(and the same with Python 3.11)

@bcdarwin bcdarwin added the 0.kind: bug Something is broken label Oct 27, 2023
@happysalada
Copy link
Contributor

Are you on darwin by any chance ?

Ive just checked the recent cargo.toml and it looks like on darwin the allocator used is mimalloc

I think with passing this as a dependency it should improve the situatuion
Also, the package is in need of an update.

Im a little stretched at the moment, how interested are you in contributing ? (No pressure, im just asking in case you are)
If you are, i would be happy to help you get a PR merged.

@bcdarwin
Copy link
Member Author

bcdarwin commented Oct 27, 2023

NixOS/Linux only, don't use Darwin at all currently. (Sorry, I meant to post nix-info output.)

@bcdarwin
Copy link
Member Author

Happy to investigate on the Linux side though.

@happysalada
Copy link
Contributor

If you have time to update the package first, it might save you some headaches.
Thanks for taking the time to look into this!

@ghost
Copy link

ghost commented Dec 5, 2023

unable to reproduce. looks like it was fixed with PR #264373

@ghost ghost closed this as completed Dec 5, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants