Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError #233

Closed
jaimebayes opened this issue Apr 2, 2018 · 20 comments
Closed

AttributeError #233

jaimebayes opened this issue Apr 2, 2018 · 20 comments

Comments

@jaimebayes
Copy link

Hi,

I followed install instructions but always got this same error:
AttributeError: module 'ipywidgets.widgets.trait_types' has no attribute 'InstanceDict'

How can I fix it?
Thanks in advance, Jaime

@pbugnion
Copy link
Owner

pbugnion commented Apr 3, 2018

Hi,

To help solve this, it'd be useful to know:

  • did you try to install jupyter-gmaps with pip or conda?
  • what does running pip list | grep ipywidgets in a terminal show?

@jaimebayes
Copy link
Author

Hi Pascal,

I installed it using conda. Also, grep is not a recognized as a command, so using just pip list, it shows ipywidgets (6.0.1).

Jaime

@pbugnion
Copy link
Owner

pbugnion commented Apr 4, 2018

Hmm -- this version of gmaps is only compatible with ipywidgets 7.x. The conda recipe should have automatically updated your version of ipywidgets, though. Any thoughts on why that didn't happen? I just tested it locally and it upgraded ipywidgets.

Anyway, to solve your issue, I'd just run conda install -c conda-forge ipywidgets to get the latest widgets release (7.2.0). After that, you'll have to make sure you restart your notebook kernel and probably refresh any open notebook browser tabs.

@jaimebayes
Copy link
Author

Hi Pascal,
After run conda install -c conda-forge ipywidgets, it gives me (6.0.1) for py36_0 conda-forge.
How can I get latest release (7.2.0)?
Thanks in advance, Jaime

@pbugnion
Copy link
Owner

pbugnion commented Apr 5, 2018

What platform are you using?

Version 7.2.0 should be available on all platforms, according to conda-forge, so just running conda install -c conda-forge ipywidgets should just work. Could you have somehow pinned the version of ipywidgets? What happens if you try in a fresh virtual environment?

@pbugnion
Copy link
Owner

Closing as unlikely to be an issue with this package directly. Feel free to reopen.

@jaimebayes
Copy link
Author

Thanks Pascal, you give good advices to solve this. I am going a try them shortly.
Jaime

@asalvadore
Copy link

asalvadore commented Apr 16, 2018

I am getting the same error when using it a google datalab machine. Any idea?

!pip install gmaps
!pip install ipywidgets
import google.datalab.bigquery as bq
import pandas as pd

!pip show gmaps
!pip show ipywidgets

Requirement already satisfied: gmaps in /usr/local/envs/py2env/lib/python2.7/site-packages (0.7.4)
Requirement already satisfied: ipywidgets>=7.0.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from gmaps) (7.2.0)
Requirement already satisfied: six in /usr/local/envs/py2env/lib/python2.7/site-packages (from gmaps) (1.10.0)
Requirement already satisfied: ipython>=5.3.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from gmaps) (5.5.0)
Requirement already satisfied: geojson>=2.0.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from gmaps) (2.3.0)
Requirement already satisfied: traitlets>=4.3.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from gmaps) (4.3.2)
Requirement already satisfied: widgetsnbextension~=3.2.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets>=7.0.0->gmaps) (3.2.1)
Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets>=7.0.0->gmaps) (4.5.2)
Requirement already satisfied: nbformat>=4.2.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets>=7.0.0->gmaps) (4.4.0)
Requirement already satisfied: setuptools>=18.5 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (38.5.1)
Requirement already satisfied: simplegeneric>0.8 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (0.8.1)
Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (1.0.0)
Requirement already satisfied: pygments in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (2.1.3)
Requirement already satisfied: pexpect; sys_platform != "win32" in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (4.4.0)
Requirement already satisfied: pickleshare in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (0.7.4)
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (1.0.15)
Requirement already satisfied: decorator in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (4.1.2)
Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython>=5.3.0->gmaps) (2.3.0)
Requirement already satisfied: ipython-genutils in /usr/local/envs/py2env/lib/python2.7/site-packages (from traitlets>=4.3.0->gmaps) (0.2.0)
Requirement already satisfied: enum34; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from traitlets>=4.3.0->gmaps) (1.1.6)
Requirement already satisfied: notebook>=4.4.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (5.4.0)
Requirement already satisfied: jupyter-client in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.0.0->gmaps) (5.2.2)
Requirement already satisfied: tornado>=4.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.0.0->gmaps) (4.4.2)
Requirement already satisfied: jupyter-core in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbformat>=4.2.0->ipywidgets>=7.0.0->gmaps) (4.4.0)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbformat>=4.2.0->ipywidgets>=7.0.0->gmaps) (2.6.0)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/envs/py2env/lib/python2.7/site-packages (from pexpect; sys_platform != "win32"->ipython>=5.3.0->gmaps) (0.5.2)
Requirement already satisfied: wcwidth in /usr/local/envs/py2env/lib/python2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=5.3.0->gmaps) (0.1.7)
Requirement already satisfied: scandir in /usr/local/envs/py2env/lib/python2.7/site-packages (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython>=5.3.0->gmaps) (1.7)
Requirement already satisfied: terminado>=0.8.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (0.8.1)
Requirement already satisfied: jinja2 in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (2.8)
Requirement already satisfied: nbconvert in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (5.3.1)
Requirement already satisfied: Send2Trash in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (1.5.0)
Requirement already satisfied: pyzmq>=13 in /usr/local/envs/py2env/lib/python2.7/site-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets>=7.0.0->gmaps) (16.0.2)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets>=7.0.0->gmaps) (2.5.0)
Requirement already satisfied: singledispatch in /usr/local/envs/py2env/lib/python2.7/site-packages (from tornado>=4.0->ipykernel>=4.5.1->ipywidgets>=7.0.0->gmaps) (3.4.0.3)
Requirement already satisfied: certifi in /usr/local/envs/py2env/lib/python2.7/site-packages (from tornado>=4.0->ipykernel>=4.5.1->ipywidgets>=7.0.0->gmaps) (2018.1.18)
Requirement already satisfied: backports_abc>=0.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from tornado>=4.0->ipykernel>=4.5.1->ipywidgets>=7.0.0->gmaps) (0.5)
Requirement already satisfied: functools32; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.0.0->gmaps) (3.2.3.post2)
Requirement already satisfied: MarkupSafe in /usr/local/envs/py2env/lib/python2.7/site-packages (from jinja2->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (1.0)
Requirement already satisfied: mistune>=0.7.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (0.8.3)
Requirement already satisfied: bleach in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (2.1.2)
Requirement already satisfied: testpath in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (0.3.1)
Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (1.4.2)
Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (0.2.3)
Requirement already satisfied: html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre in /usr/local/envs/py2env/lib/python2.7/site-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (1.0.1)
Requirement already satisfied: configparser>=3.5; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from entrypoints>=0.2.2->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (3.5.0)
Requirement already satisfied: webencodings in /usr/local/envs/py2env/lib/python2.7/site-packages (from html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre->bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets>=7.0.0->gmaps) (0.5)
google-cloud-pubsub 0.29.4 has requirement psutil<6.0dev,>=5.2.2, but you'll have psutil 4.3.0 which is incompatible.
google-cloud-storage 1.6.0 has requirement requests>=2.18.0, but you'll have requests 2.9.1 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement dill==0.2.6, but you'll have dill 0.2.7.1 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement google-cloud-bigquery<0.24.0,>=0.23.0, but you'll have google-cloud-bigquery 0.28.0 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement httplib2<0.10,>=0.8, but you'll have httplib2 0.10.3 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement proto-google-cloud-datastore-v1==0.90.0, but you'll have proto-google-cloud-datastore-v1 0.90.4 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement pyyaml<4.0.0,>=3.12, but you'll have pyyaml 3.11 which is incompatible.
google-api-core 0.1.4 has requirement futures>=3.2.0, but you'll have futures 3.0.5 which is incompatible.
google-api-core 0.1.4 has requirement requests<3.0.0dev,>=2.18.0, but you'll have requests 2.9.1 which is incompatible.
grpcio 1.9.1 has requirement protobuf>=3.5.0.post1, but you'll have protobuf 3.2.0 which is incompatible.
google-cloud-spanner 0.29.0 has requirement requests<3.0dev,>=2.18.4, but you'll have requests 2.9.1 which is incompatible.
google-gax 0.15.16 has requirement requests<3.0dev,>=2.13.0, but you'll have requests 2.9.1 which is incompatible.
tensorflow 1.5.0 has requirement protobuf>=3.4.0, but you'll have protobuf 3.2.0 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement bleach==1.5.0, but you'll have bleach 2.1.2 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement futures>=3.1.1; python_version < "3", but you'll have futures 3.0.5 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement protobuf>=3.4.0, but you'll have protobuf 3.2.0 which is incompatible.
google-cloud-bigquery 0.28.0 has requirement requests>=2.18.0, but you'll have requests 2.9.1 which is incompatible.
googledatastore 7.0.1 has requirement httplib2<0.10,>=0.9.1, but you'll have httplib2 0.10.3 which is incompatible.
Requirement already satisfied: ipywidgets in /usr/local/envs/py2env/lib/python2.7/site-packages (7.2.0)
Requirement already satisfied: ipython<6.0.0,>=4.0.0; python_version < "3.3" in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets) (5.5.0)
Requirement already satisfied: traitlets>=4.3.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets) (4.3.2)
Requirement already satisfied: widgetsnbextension~=3.2.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets) (3.2.1)
Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets) (4.5.2)
Requirement already satisfied: nbformat>=4.2.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipywidgets) (4.4.0)
Requirement already satisfied: decorator in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (4.1.2)
Requirement already satisfied: simplegeneric>0.8 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (0.8.1)
Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (1.0.0)
Requirement already satisfied: pygments in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (2.1.3)
Requirement already satisfied: pexpect; sys_platform != "win32" in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (4.4.0)
Requirement already satisfied: pickleshare in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (0.7.4)
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (1.0.15)
Requirement already satisfied: setuptools>=18.5 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (38.5.1)
Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (2.3.0)
Requirement already satisfied: ipython-genutils in /usr/local/envs/py2env/lib/python2.7/site-packages (from traitlets>=4.3.1->ipywidgets) (0.2.0)
Requirement already satisfied: six in /usr/local/envs/py2env/lib/python2.7/site-packages (from traitlets>=4.3.1->ipywidgets) (1.10.0)
Requirement already satisfied: enum34; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from traitlets>=4.3.1->ipywidgets) (1.1.6)
Requirement already satisfied: notebook>=4.4.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from widgetsnbextension~=3.2.0->ipywidgets) (5.4.0)
Requirement already satisfied: jupyter-client in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipykernel>=4.5.1->ipywidgets) (5.2.2)
Requirement already satisfied: tornado>=4.0 in /usr/local/envs/py2env/lib/python2.7/site-packages (from ipykernel>=4.5.1->ipywidgets) (4.4.2)
Requirement already satisfied: jupyter-core in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbformat>=4.2.0->ipywidgets) (4.4.0)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbformat>=4.2.0->ipywidgets) (2.6.0)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/envs/py2env/lib/python2.7/site-packages (from pexpect; sys_platform != "win32"->ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (0.5.2)
Requirement already satisfied: wcwidth in /usr/local/envs/py2env/lib/python2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (0.1.7)
Requirement already satisfied: scandir in /usr/local/envs/py2env/lib/python2.7/site-packages (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython<6.0.0,>=4.0.0; python_version < "3.3"->ipywidgets) (1.7)
Requirement already satisfied: terminado>=0.8.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (0.8.1)
Requirement already satisfied: jinja2 in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (2.8)
Requirement already satisfied: nbconvert in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (5.3.1)
Requirement already satisfied: Send2Trash in /usr/local/envs/py2env/lib/python2.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (1.5.0)
Requirement already satisfied: pyzmq>=13 in /usr/local/envs/py2env/lib/python2.7/site-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets) (16.0.2)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from jupyter-client->ipykernel>=4.5.1->ipywidgets) (2.5.0)
Requirement already satisfied: singledispatch in /usr/local/envs/py2env/lib/python2.7/site-packages (from tornado>=4.0->ipykernel>=4.5.1->ipywidgets) (3.4.0.3)
Requirement already satisfied: certifi in /usr/local/envs/py2env/lib/python2.7/site-packages (from tornado>=4.0->ipykernel>=4.5.1->ipywidgets) (2018.1.18)
Requirement already satisfied: backports_abc>=0.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from tornado>=4.0->ipykernel>=4.5.1->ipywidgets) (0.5)
Requirement already satisfied: functools32; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets) (3.2.3.post2)
Requirement already satisfied: MarkupSafe in /usr/local/envs/py2env/lib/python2.7/site-packages (from jinja2->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (1.0)
Requirement already satisfied: mistune>=0.7.4 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (0.8.3)
Requirement already satisfied: bleach in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (2.1.2)
Requirement already satisfied: testpath in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (0.3.1)
Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (1.4.2)
Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/envs/py2env/lib/python2.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (0.2.3)
Requirement already satisfied: html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre in /usr/local/envs/py2env/lib/python2.7/site-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (1.0.1)
Requirement already satisfied: configparser>=3.5; python_version == "2.7" in /usr/local/envs/py2env/lib/python2.7/site-packages (from entrypoints>=0.2.2->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (3.5.0)
Requirement already satisfied: webencodings in /usr/local/envs/py2env/lib/python2.7/site-packages (from html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre->bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.2.0->ipywidgets) (0.5)
google-cloud-pubsub 0.29.4 has requirement psutil<6.0dev,>=5.2.2, but you'll have psutil 4.3.0 which is incompatible.
google-cloud-storage 1.6.0 has requirement requests>=2.18.0, but you'll have requests 2.9.1 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement dill==0.2.6, but you'll have dill 0.2.7.1 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement google-cloud-bigquery<0.24.0,>=0.23.0, but you'll have google-cloud-bigquery 0.28.0 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement httplib2<0.10,>=0.8, but you'll have httplib2 0.10.3 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement proto-google-cloud-datastore-v1==0.90.0, but you'll have proto-google-cloud-datastore-v1 0.90.4 which is incompatible.
google-cloud-dataflow 2.0.0 has requirement pyyaml<4.0.0,>=3.12, but you'll have pyyaml 3.11 which is incompatible.
google-api-core 0.1.4 has requirement futures>=3.2.0, but you'll have futures 3.0.5 which is incompatible.
google-api-core 0.1.4 has requirement requests<3.0.0dev,>=2.18.0, but you'll have requests 2.9.1 which is incompatible.
grpcio 1.9.1 has requirement protobuf>=3.5.0.post1, but you'll have protobuf 3.2.0 which is incompatible.
google-cloud-spanner 0.29.0 has requirement requests<3.0dev,>=2.18.4, but you'll have requests 2.9.1 which is incompatible.
google-gax 0.15.16 has requirement requests<3.0dev,>=2.13.0, but you'll have requests 2.9.1 which is incompatible.
tensorflow 1.5.0 has requirement protobuf>=3.4.0, but you'll have protobuf 3.2.0 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement bleach==1.5.0, but you'll have bleach 2.1.2 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement futures>=3.1.1; python_version < "3", but you'll have futures 3.0.5 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement protobuf>=3.4.0, but you'll have protobuf 3.2.0 which is incompatible.
google-cloud-bigquery 0.28.0 has requirement requests>=2.18.0, but you'll have requests 2.9.1 which is incompatible.
googledatastore 7.0.1 has requirement httplib2<0.10,>=0.9.1, but you'll have httplib2 0.10.3 which is incompatible.
Name: gmaps
Version: 0.7.4
Summary: Google maps plugin for Jupyter notebooks
Home-page: https://github.com/pbugnion/gmaps
Author: Pascal Bugnion
Author-email: pascal@bugnion.org
License: UNKNOWN
Location: /usr/local/envs/py2env/lib/python2.7/site-packages
Requires: ipywidgets, six, ipython, geojson, traitlets
Required-by: 
Name: ipywidgets
Version: 7.2.0
Summary: IPython HTML widgets for Jupyter
Home-page: http://ipython.org
Author: IPython Development Team
Author-email: ipython-dev@scipy.org
License: BSD
Location: /usr/local/envs/py2env/lib/python2.7/site-packages
Requires: ipython, traitlets, widgetsnbextension, ipykernel, nbformat
Required-by: gmaps

@pbugnion
Copy link
Owner

pbugnion commented Apr 16, 2018

Based on this message, it does look like you do have the correct version of ipywidgets in the environment in which pip is listed, but the wrong environment available to the kernel.

What does restarting the kernel and running the following show?

import gmaps
import ipywidgets as widgets
gmaps.__version__, widgets.__version__

@asalvadore
Copy link

it fails with the same error

AttributeErrorTraceback (most recent call last)
<ipython-input-4-29e24eb45cf3> in <module>()
----> 1 import gmaps
      2 import ipywidgets as widgets
      3 gmaps.__version__, widgets.__version__

/usr/local/envs/py2env/lib/python2.7/site-packages/gmaps/__init__.py in <module>()
      1 from ._version import __version__  # noqa
      2 
----> 3 from .figure import *  # noqa
      4 from .maps import *  # noqa
      5 from .marker import *  # noqa

/usr/local/envs/py2env/lib/python2.7/site-packages/gmaps/figure.py in <module>()
     25 
     26 
---> 27 class Figure(GMapsWidgetMixin, widgets.DOMWidget):
     28     """
     29     Figure widget

/usr/local/envs/py2env/lib/python2.7/site-packages/gmaps/figure.py in Figure()
     42     map_type = MapType('ROADMAP')
     43     mouse_handling = MouseHandling('COOPERATIVE')
---> 44     layout = widgets.trait_types.InstanceDict(FigureLayout).tag(
     45         sync=True, **widgets.widget_serialization)
     46 

AttributeError: 'module' object has no attribute 'InstanceDict'

@asalvadore
Copy link

Sorry after restarting it seems to print something out but still not really working

('0.7.4', '7.2.1')

@pbugnion
Copy link
Owner

Ah -- those are correct.

but still not really working

What is not working now? Are you seeing an exception? If not, what does your browser console show?

Note that, if you installed jupyter-gmaps with pip, you also need to run the following command to activate the notebook extension part of gmaps:

jupyter nbextension enable --py --sys-prefix gmaps

See installing with pip for more information on installation.

@asalvadore
Copy link

OK, I missed that step. Having done that the map still doesn't show and there are a pile of errors in the console.

[x] manager-base.js:273 Could not instantiate widget
[x] utils.js:119 Error: Could not create a model.
    at promiseRejection (utils.js:119)
[x] kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
[x] require.js:165 Uncaught (in promise) Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)

@pbugnion
Copy link
Owner

You need to refresh the browser page after you've enabled the extension -- Jupyter only loads extensions on page load.

If that doesn't help, what does jupyter nbextension list show?

@asalvadore
Copy link

Yes, I tried refreshing a few times to be honest.. Will check the list command

@mogli91
Copy link

mogli91 commented Apr 18, 2018

Hi @asalvadore,
Were you able to display a gmap in datalab? After trying all different kinds of setting this up (pip and conda, starting from scratch with a new machine and new disk in datalab each time), I still get tons of errors at fig = gmaps.figure(). The simple widget example works:

import ipywidgets as widgets
widgets.IntSlider()

jupyter extensions list is:

Known nbextensions:
  config dir: /content/.jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
  config dir: /usr/local/envs/py2env/etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
      jupyter-gmaps/extension  enabled 
      - Validating: OK
import gmaps
import ipywidgets as widgets
gmaps.__version__, widgets.__version__

shows ('0.7.4', '7.2.1')

Note: I also tried manually removing ipywidgets like this:

conda uninstall -y -c conda-forge ipywidgets
jupyter nbextension uninstall --py widgetsnbextension
jupyter nbextension uninstall --py --sys-prefix widgetsnbextension

Then, I installed ipywidgets and gmaps using conda uninstall -y -c conda-forge gmaps.

jupyter nbextension list then says:

Known nbextensions:
  config dir: /usr/local/envs/py2env/etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      jupyter-gmaps/extension  enabled 
      - Validating: OK
      - Validating: OK

So, this seems good but the errors persist. After resetting the kernel, refreshing the page (and also re-starting the server) my error log is:

require.js:1952 GET http://localhost:8081/static/jupyter-gmaps.js net::ERR_ABORTED
req.load @ require.js:1952
load @ require.js:1679
load @ require.js:829
fetch @ require.js:819
check @ require.js:851
enable @ require.js:1177
enable @ require.js:1550
(anonymous) @ require.js:1162
(anonymous) @ require.js:131
each @ require.js:56
enable @ require.js:1114
init @ require.js:783
(anonymous) @ require.js:1453
setTimeout (async)
req.nextTick @ require.js:1809
localRequire @ require.js:1442
requirejs @ require.js:1791
(anonymous) @ widgets.css:8
WidgetManager.loadClass @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase._make_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.336 widgets.css:8 Could not instantiate widget
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
rejected @ widgets.css:8
Promise.then (async)
step @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase._make_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.337 iteration.js:549 Error: Could not create a model.
    at promiseRejection (iteration.js:549)
promiseRejection @ iteration.js:549
Promise.catch (async)
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.337 kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
(anonymous) @ kernel.js:974
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:974
i @ jquery.min.js:4
00:14:22.339 require.js:165 Uncaught (in promise) Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
makeError @ require.js:165
onScriptError @ require.js:1732
Promise.then (async)
ManagerBase.register_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.344 widgets.css:8 Could not instantiate widget
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
rejected @ widgets.css:8
Promise.then (async)
step @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase._make_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.345 iteration.js:549 Error: Could not create a model.
    at promiseRejection (iteration.js:549)
promiseRejection @ iteration.js:549
Promise.catch (async)
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.345 kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
(anonymous) @ kernel.js:974
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:974
i @ jquery.min.js:4
00:14:22.346 require.js:165 Uncaught (in promise) Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
makeError @ require.js:165
onScriptError @ require.js:1732
Promise.then (async)
ManagerBase.register_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.351 widgets.css:8 Could not instantiate widget
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
rejected @ widgets.css:8
Promise.then (async)
step @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase._make_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.351 iteration.js:549 Error: Could not create a model.
    at promiseRejection (iteration.js:549)
promiseRejection @ iteration.js:549
Promise.catch (async)
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.352 kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
(anonymous) @ kernel.js:974
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:974
i @ jquery.min.js:4
00:14:22.353 require.js:165 Uncaught (in promise) Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
makeError @ require.js:165
onScriptError @ require.js:1732
Promise.then (async)
ManagerBase.register_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.357 widgets.css:8 Could not instantiate widget
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
rejected @ widgets.css:8
Promise.then (async)
step @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase._make_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.357 iteration.js:549 Error: Could not create a model.
    at promiseRejection (iteration.js:549)
promiseRejection @ iteration.js:549
Promise.catch (async)
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.358 kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
(anonymous) @ kernel.js:974
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:974
i @ jquery.min.js:4
00:14:22.358 require.js:165 Uncaught (in promise) Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
makeError @ require.js:165
onScriptError @ require.js:1732
Promise.then (async)
ManagerBase.register_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.401 widgets.css:8 Could not instantiate widget
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
rejected @ widgets.css:8
Promise.then (async)
step @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase._make_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.402 iteration.js:549 Error: Could not create a model.
    at promiseRejection (iteration.js:549)
promiseRejection @ iteration.js:549
Promise.catch (async)
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.402 kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
(anonymous) @ kernel.js:974
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:974
i @ jquery.min.js:4
00:14:22.403 kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
(anonymous) @ kernel.js:974
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:974
i @ jquery.min.js:4
00:14:22.403 kernel.js:974 Couldn't process kernel message Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
(anonymous) @ kernel.js:974
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:974
i @ jquery.min.js:4
00:14:22.416 require.js:165 Uncaught (in promise) Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)
makeError @ require.js:165
onScriptError @ require.js:1732
Promise.then (async)
ManagerBase.register_model @ widgets.css:8
(anonymous) @ widgets.css:8
step @ widgets.css:8
(anonymous) @ widgets.css:8
(anonymous) @ widgets.css:8
__awaiter @ widgets.css:8
ManagerBase.new_model @ widgets.css:8
ManagerBase.handle_comm_open @ widgets.css:8
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:4
Kernel._handle_iopub_message @ kernel.js:1146
Kernel._finish_ws_message @ kernel.js:982
(anonymous) @ kernel.js:973
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:973
i @ jquery.min.js:4
00:14:22.417 require.js:165 Uncaught (in promise) Error: Script error for "jupyter-gmaps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:165)
    at HTMLScriptElement.onScriptError (require.js:1732)

@mogli91
Copy link

mogli91 commented Apr 18, 2018

@pbugnion : On refreshing the page, I see logs for loading the js-widgets extensions (like load_extensions Arguments ["jupyter-js-widgets/extension",... or Loading extension: jupyter-js-widgets/extension but I cannot find any similar message for a gmaps extension. Is this the expected behavior? If not, how can I ensure the extension for gmaps is loaded?

cat /usr/local/envs/py2env/etc/jupyter/nbconfig/notebook.json says

{
  "load_extensions": {
    "jupyter-js-widgets/extension": true, 
    "jupyter-gmaps/extension": true
  }
}

@mogli91
Copy link

mogli91 commented Apr 18, 2018

It looks like enabling the extensions for the --user makes it work. Starting from scratch, I now execute the following commands in a new datalab instance:

!conda install -y -c conda-forge gmaps
!jupyter nbextension install --py --user gmaps
!jupyter nbextension enable --py --user gmaps
!jupyter nbextension list

which gets me:

Known nbextensions:
  config dir: /content/.jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
      jupyter-gmaps/extension  enabled 
      - Validating: OK
  config dir: /usr/local/envs/py2env/etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
      jupyter-gmaps/extension  enabled 
      - Validating: OK

now I see these logs
load_extensions Arguments(2) ["jupyter-gmaps/extension", "jupyter-js-widgets/extension", ... and
Loading extension: jupyter-gmaps/extension and
Loading extension: jupyter-js-widgets/extension

@pbugnion
Copy link
Owner

pbugnion commented Apr 19, 2018

Thanks very much for the detailed report -- that's super useful.

I believe the general consensus in the Jupyter community is that the --user config shouldn't be used any more, since it doesn't play well with virtual environments. Not sure whether datalab supports virtual environments, so this might not be relevant.

Not really sure what went wrong with your installation, but I'm a bit worried that you now have two versions of both jupyter-js-widgets/extension and jupyter-gmaps/extension. This might be problematic when you upgrade gmaps etc.

I'll have a play with datalab over the weekend and try to come up with suitable installation instructions.

@tyron
Copy link

tyron commented Jun 24, 2018

Just a noite: running Datalab with version 0.7.4 worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants