pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.63k stars 1.09k forks source link

DOC: Clarify error message in open_dataarray #9637

Closed DWesl closed 1 month ago

DWesl commented 1 month ago

If the file is empty (or contains no variables matching any filtering done by the backend), use a different error message indicating that, rather than suggesting that the file has too many variables for this function.

I feel like the new message could be longer, but there's not really a way to fix "no data" in python, unless the writing process decided to add everything to the global coordinates attribute or something.