anaconda / nb_conda

Conda environment and package access extension from within Jupyter
BSD 3-Clause "New" or "Revised" License
140 stars 32 forks source link

conda tab gives an error - AttributeError: 'dict' object has no attribute 'rsplit' #46

Closed ink1 closed 7 years ago

ink1 commented 7 years ago

I get this error when starting Jupyter notebook and clicking on Conda tab in the browser:

[E 15:14:49.783 NotebookApp] Unhandled error in API request ... File "/XXX/lib/python3.5/site-packages/nb_conda/envmanager.py", line 17, in pkg_info name, version, build = s.rsplit('-', 2) AttributeError: 'dict' object has no attribute 'rsplit'

Replacing the problematic line with name, version, build = s["dist_name"].rsplit('-', 2) fixes the issue but I'm not sure how or whether the grand scheme of things is affected.

Clearly function pkg_info expects a string but env_packages passes a dictionary. Conda list returns effectively a list of dictionaries and there seems to be confusion about processing this list. This is using conda 4.3.13 nb_conda 2.0.0 py35_0

The current version of envmanager.py seems identical to v 2.0

damianavila commented 7 years ago

Already reported here: https://github.com/Anaconda-Platform/nb_conda/issues/39

damianavila commented 7 years ago

Closing in favor of #39, so we have just one issue describing the problem.