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

Ensure that engine parameter is specified in every open_dataset call #458

Open
pont-us opened this issue May 19, 2021 · 0 comments
Open

Comments

@pont-us
Copy link
Member

pont-us commented May 19, 2021

From xarray issues such as pydata/xarray#5329, pydata/xarray#5295, and pydata/xarray#5291, it is clear that it's dangerous to use xarray's open_dataset or open_mfdataset without explicitly specifying the engine parameter. Quote from this comment by an xarray developer:

The logic for autodetecting the engine has always been extremely fragile and the result depends on what packages are installed on the system.

In principle, any engine plugin installed in the user's environment (including ones we don't know of) could claim the file and do anything with it (including throwing exceptions and hanging indefinitely). So in every open_dataset or open_mfdataset call where it's possible, we should explicitly specify the engine parameter. If we have any calls where this isn't possible (i.e. we don't know in advance what filetype and/or engine we're expecting), we should consider on a case-by-case basis how best to mitigate unexpected engine behaviour. But I suspect that there will be very few or no such cases.

@forman forman mentioned this issue Oct 4, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant