You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError with loading data with xarray on Google Colab #7149
The package xarray appear to not working since this morning. I have written some script that was utilizing xarray to load and interpolate netcdf data last night. But this morning when I went back to the same script and run it again it shows an attribute error AttributeError: 'EntryPoints' object has no attribute 'get'
To make sure my data sources is not corrupted, I inspected and can open it with netcdf4 package smoothly without any hiccups.
I tried to open built in tutorial / sample dataset with xarray and it also appears with the same error message
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
[<ipython-input-1-daa755d2bb23>](https://localhost:8080/#) in <module>
1 import xarray as xr
----> 2 xr.tutorial.load_dataset('air_temperature')
4 frames
[/usr/local/lib/python3.7/dist-packages/xarray/backends/plugins.py](https://localhost:8080/#) in list_engines()
103 @functools.lru_cache(maxsize=1)
104 def list_engines():
--> 105 entrypoints = entry_points().get("xarray.backends", ())
106 return build_engines(entrypoints)
107
AttributeError: 'EntryPoints' object has no attribute 'get'
@headtr1ck Thanks for the suggestions. After downgrading to the previous version and it seems to be working again. I guess at the moment we have to make sure the version of importlib-metadata package is not over 5.0.0 to have xarray run without any problem. @keewis Thanks for the solution.
Activity
headtr1ck commentedon Oct 9, 2022
The problem seems to be importlib-metadata 5.0.0 which was released some days ago that deprecates the old entry point system.
You could try to install version 4.* Of it and check if it works?
keewis commentedon Oct 9, 2022
otherwise you would probably have to upgrade your environment, we dropped support for
python 3.7some time agongohikennyyue commentedon Oct 9, 2022
@headtr1ck Thanks for the suggestions. After downgrading to the previous version and it seems to be working again. I guess at the moment we have to make sure the version of importlib-metadata package is not over 5.0.0 to have xarray run without any problem.
@keewis Thanks for the solution.
keewis commentedon Oct 9, 2022
great, happy to hear that it works for you. Let's close this issue, then.