question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 'xarray' has no attribute 'Dataset'

See original GitHub issue

Problem description

When running conda install -c cogsci pygame Anaconda does an update on all packages and then fails with AttributeError: module ‘xarray’ has no attribute ‘Dataset’. Seems to be coming via leaflet.

Output of xr.show_versions()

INSTALLED VERSIONS

commit: None python: 3.6.5.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None

xarray: 0.10.7 pandas: 0.23.1 numpy: 1.14.5 scipy: 1.1.0 netCDF4: 1.4.0 h5netcdf: 0.6.1 h5py: 2.8.0 Nio: None zarr: None bottleneck: 1.2.1 cyordereddict: None dask: 0.18.1 distributed: 1.22.0 matplotlib: 2.2.2 cartopy: None seaborn: 0.8.1 setuptools: 39.2.0 pip: 9.0.3 conda: 4.5.8 pytest: 3.6.2 IPython: 6.4.0 sphinx: 1.7.5

Full error message:

Attempting to roll back.

Rolling back transaction: \ DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’] DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\python.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\python.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’, ‘–reset’] / DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py’] | DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\anaconda-navigator-script.py’] / DEBUG menuinst_win32:init(196): Menu: name: ‘Anaconda${PY_VER} ${PLATFORM}’, prefix: ‘C:\ProgramData\Anaconda3’, env_name: ‘None’, mode: ‘system’, used_mode: ‘system’ DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\pythonw.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\pythonw.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’] DEBUG menuinst_win32:create(320): Shortcut cmd is C:\ProgramData\Anaconda3\python.exe, args are [‘C:\ProgramData\Anaconda3\cwp.py’, ‘C:\ProgramData\Anaconda3’, ‘C:\ProgramData\Anaconda3\python.exe’, ‘C:\ProgramData\Anaconda3\Scripts\spyder-script.py’, ‘–reset’] done

LinkError: post-link script failed for package conda-forge::ipyleaflet-0.9.0-py35_0 running your command again with -v will provide additional information location of failed script: C:\ProgramData\Anaconda3\Scripts.ipyleaflet-post-link.bat ==> script messages <== Traceback (most recent call last): File “C:\ProgramData\Anaconda3\Scripts\jupyter-nbextension-script.py”, line 10, in <module> sys.exit(main()) File “C:\ProgramData\Anaconda3\lib\site-packages\jupyter_core\application.py”, line 266, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File “C:\ProgramData\Anaconda3\lib\site-packages\traitlets\config\application.py”, line 658, in launch_instance app.start() File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 988, in start super(NBExtensionApp, self).start() File “C:\ProgramData\Anaconda3\lib\site-packages\jupyter_core\application.py”, line 255, in start self.subapp.start() File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 896, in start self.toggle_nbextension_python(self.extra_args[0]) File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 872, in toggle_nbextension_python logger=self.log) File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 483, in enable_nbextension_python logger=logger) File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 380, in _set_nbextension_state_python m, nbexts = _get_nbextension_metadata(module) File “C:\ProgramData\Anaconda3\lib\site-packages\notebook\nbextensions.py”, line 1122, in get_nbextension_metadata m = import_item(module) File “C:\ProgramData\Anaconda3\lib\site-packages\traitlets\utils\importstring.py”, line 42, in import_item return import(parts[0]) File "C:\ProgramData\Anaconda3\lib\site-packages\ipyleaflet_init.py", line 7, in <module> from .leaflet import * File “C:\ProgramData\Anaconda3\lib\site-packages\ipyleaflet\leaflet.py”, line 214, in <module> class Velocity(Layer): File “C:\ProgramData\Anaconda3\lib\site-packages\ipyleaflet\leaflet.py”, line 224, in Velocity data = Dataset().tag(sync=True, to_json=ds_x_to_json) File “C:\ProgramData\Anaconda3\lib\site-packages\traittypes\traittypes.py”, line 266, in init kwargs[‘klass’] = xr.Dataset AttributeError: module ‘xarray’ has no attribute ‘Dataset’

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
geoidesiccommented, Jun 1, 2021

I still get this issue when installing xarray using pip on python 3.6.10

0reactions
martinRenoucommented, Dec 19, 2018

Cool! Thanks for reporting the issue 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Imported python xarray module's attributes aren't working
I've installed Python's xarray module using $ conda install xarray ... AttributeError: module 'xarray' has no attribute 'open_mfdataset'.
Read more >
Working with Climate Data
Here's an example: Search for calculate correlation xarray dataset . ... da_b) AttributeError: module 'xarray' has no attribute 'corr' ...
Read more >
xarray.DataArray
Convert this array and its coordinates into a tidy pandas.DataFrame. to_dataset ([dim, name, promote_attrs]). Convert a DataArray to a Dataset.
Read more >
Error when importing PyMC3 3.9.3 - PyMC Discourse
Hi, I've been using PyMC3 3.9.3 for a while. But very recently (within a week) I am not able to import the package...
Read more >
xarray.Dataset.convert_calendar() - Google Groups
to xarray. I was trying to convert the calendar type of a dataset to a standard ... AttributeError: 'Dataset' object has no attribute...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found