-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
LazyFrame.schema fails with "Option::unwrap() on a
None` value"
#16442
Comments
Thanks for the report. I cannot reproduce the panic with your code, could you try to come up with a MRE? |
I'm currently trying, so far no success. I tried dropping the Also found something fishy on the offending LazyFrame: dropping the Null column "span" hides the issue:
but then if I do that it fails:
which is the same error as when trying that:
So somehow the EDIT: I added a comment regarding that Null serialize problem on issue 15150 |
The error is coming from
There are a couple of new issues just opened regarding this: #16436 (They are probably all the same underlying problem.) |
@stinodego I could not make an MRE, but I have a pdb session open with the issue so I can run some snippets on that dataframe if needed. |
Fixed by #16443. |
I built the PR and I cannot reproduce the issue anymore, thanks ! |
Checks
Reproducible example
Not really a reproducer but this snippet has more or less the structure of the offending code (irrelevant columns have been left out):
Important notes
with_columns()
seems hides the issue, so ref-counting is possibly involved (might be a coincidence)print(df.drop('b2').schema)
orprint(df.drop('a').schema)
is used at the end, the issue goes away, so it's something about those columns specificallyLog output
Issue description
Polars attempts to
None.unwrap()
which panics.Expected behavior
df.schema
should give back the schema in all circumstancesInstalled versions
The text was updated successfully, but these errors were encountered: