pbugnion / gmaps

Google maps for Jupyter notebooks
https://jupyter-gmaps.readthedocs.io/en/stable/
Other
760 stars 146 forks source link

TraitError: The 'config' trait of a Map instance must be a Config, but a value of class 'dict' was specified #178

Closed pbugnion closed 7 years ago

pbugnion commented 7 years ago

To reproduce:

import gmaps
gmaps.configure(api_key=...)
gmaps.Map()

# throws TraitError: The 'config' trait of a Map instance must be a Config, but a value of class 'dict' was specified

This seems to happen when the user has gmaps 0.6.0 and ipywidgets 6.

pbugnion commented 7 years ago

This should now be fixed with gmaps 0.6.1. To install:

$ conda install -c conda-forge gmaps

The conda recipe for the previous version of gmaps (0.6.0) had the wrong lower-bound dependency for ipywidgets. This caused users currently running ipywidgets 6 who upgraded to gmaps 0.6.0 to end up with a broken installation. gmaps 0.6.0 only supports ipywidgets 7.

(Edited this after the release of 0.6.1).

RuilinYang-beta commented 7 years ago

Thank you, this perfectly solves my problem!

I find that under ipywidgets 6, the highest version of gmaps available is 0.6.0.

Tips for someone novice as me:
You should upgrade ipywidgets to 7 before install gmaps 0.6.1. Run this two line.

conda install -c conda-forge ipywidgets
conda install -c conda-forge gmaps
pbugnion commented 7 years ago

Good to know that it's working!

I find that under ipywidgets 6, the highest version of gmaps available is 0.6.0.

Actually, the highest version that works with ipywidgets 6 is gmaps 0.5.4. The requirements on conda-forge for version 0.6.0 are wrong, but, as far as I can tell, I cannot remove that version.

pbugnion commented 7 years ago

Closing as resolved! Thanks for the help.