Polars dies on working code when POLARS_PANIC_ON_ERR=1 is set #20228
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Log output
Issue description
When
pl.from_pandas()
is called on a pandas DataFrame with categorical column and POLARS_PANIC_ON_ERR=1, polars panics and raises a pyo3_runtime.PanicException. When the env var is set to 0, everything works as expected.Expected behavior
Code that works under normal condition should keep working when POLARS_PANIC_ON_ERR=1, otherwise that reduces a lot its usability as a debugging tool as it will divert the attention away from the real problem being investigated.
On top of that, it also prevents setting it as an env var in e.g. a CI system, which could otherwise gather useful info for intermittent problems.
Installed versions
----Optional dependencies----
adbc_driver_manager
altair
boto3 1.35.48
cloudpickle
connectorx
deltalake
fastexcel
fsspec
gevent
google.auth
great_tables
matplotlib
nest_asyncio 1.6.0
numpy 2.1.2
openpyxl
pandas 2.2.3
pyarrow 17.0.0
pydantic
pyiceberg
sqlalchemy
torch
xlsx2csv
xlsxwriter
The text was updated successfully, but these errors were encountered: