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

pl.lit({}) PanicException #19204

Closed
2 tasks done
cmdlineluser opened this issue Oct 12, 2024 · 0 comments · Fixed by #19214
Closed
2 tasks done

pl.lit({}) PanicException #19204

cmdlineluser opened this issue Oct 12, 2024 · 0 comments · Fixed by #19214
Assignees
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars

Comments

@cmdlineluser
Copy link
Contributor

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

import polars as pl

pl.lit({})
# thread '<unnamed>' panicked at crates/polars-python/src/functions/lazy.rs:481:62:
# called `Result::unwrap()` on an `Err` value: ComputeError(ErrString("cannot # convert any-value StructOwned(([], [])) to literal"))

Log output

No response

Issue description

It seems to error with any dict.

pl.lit({"foo": 1})
# thread '<unnamed>' panicked at crates/polars-python/src/functions/lazy.rs:481:62:
# called `Result::unwrap()` on an `Err` value: 
# ComputeError(ErrString("cannot convert any-value StructOwned(([Int64(1)], [Field { name: \"foo\", dtype: Int64 }])) to literal"))

Expected behavior

No panic.

Installed versions

main
@cmdlineluser cmdlineluser added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Oct 12, 2024
@c-peters c-peters added the accepted Ready for implementation label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants