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

in pl.read_csv: storage_options is modified inplace (an extra param called "encoding" is added inplace) #15849

Closed
giuliaviolatto opened this issue Apr 23, 2024 · 3 comments · Fixed by #15859
Labels
accepted Ready for implementation bug Something isn't working

Comments

@giuliaviolatto
Copy link

https://github.com/pola-rs/polars/blob/c0b317904196151400fed81c1eccfc1f3a40f411/py-polars/polars/io/_utils.py#L236C13-L236C51

@giuliaviolatto giuliaviolatto changed the title in pl.read_csv: storage_options is modified inplace (by adding an extra param encoding" in pl.read_csv: storage_options is modified inplace (by adding an extra param "encoding") Apr 23, 2024
@giuliaviolatto giuliaviolatto changed the title in pl.read_csv: storage_options is modified inplace (by adding an extra param "encoding") in pl.read_csv: storage_options is modified inplace (an extra param called "encoding" is added inplace) Apr 23, 2024
@giuliaviolatto
Copy link
Author

In pl.read_csv: storage_options is modified inplace (by adding an extra param "encoding"). Instead: use a deepcopy of storage_option.

Consequence: when importing a csv, an extra param called "encoding" will be added to storage_option (this is not intended behavior),
and then you try to read a parquet, the error "ComputeError: unknown configuration key: encoding" will be generated, as encoding is not an accepted param for storage_option.

@alexander-beedie
Copy link
Collaborator

Thanks for the bug report :)

@giuliaviolatto
Copy link
Author

thanks for solving it!

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
Projects
Archived in project
2 participants