pbugnion / gmaps

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

Failed to display Jupyter Widget #174

Closed tespintom closed 7 years ago

tespintom commented 7 years ago

I am having issues displaying gmaps once i upgraded anaconda to jupyter 5.0. are there any known issues? when i did the initial installation, added dependencies, when i try to run it instead of displaying the map like before i get the following:

A Jupyter Widget Thanks

pbugnion commented 7 years ago

There are no known issues. To help diagnose the issue, can you paste the output of:

$ jupyter --version
$ jupyter notebook --version
$ pip list | grep ipywidgets

... as well as an example of the code that causes the issue?

tespintom commented 7 years ago

$ jupyter notebook --version 5.0.0 $ jupyter --version 4.3.0 $ pip list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. alabaster (0.7.10) anaconda-client (1.6.3) anaconda-navigator (1.6.2) anaconda-project (0.6.0) appnope (0.1.0) appscript (1.0.1) asn1crypto (0.22.0) astroid (1.4.9) astropy (1.3.2) Babel (2.4.0) backports.shutil-get-terminal-size (1.0.0) beautifulsoup4 (4.6.0) bitarray (0.8.1) blaze (0.10.1) bleach (1.5.0) bokeh (0.12.5) boto (2.46.1) Bottleneck (1.2.1) branca (0.2.0) cffi (1.10.0) chardet (3.0.3) click (6.7) cloudpickle (0.2.2) clyent (1.2.2) colorama (0.3.9) conda (4.3.23) contextlib2 (0.5.5) cryptography (1.8.1) cycler (0.10.0) Cython (0.25.2) cytoolz (0.8.2) dask (0.14.3) datashape (0.5.4) decorator (4.0.11) distributed (1.16.3) docutils (0.13.1) entrypoints (0.2.2) et-xmlfile (1.0.1) fastcache (1.0.2) Flask (0.12.2) Flask-Cors (3.0.2) folium (0.3.0) geojson (2.0.0) geopy (1.11.0) gevent (1.2.1) gmaps (0.5.4) greenlet (0.4.12) h5py (2.7.0) HeapDict (1.0.0) html5lib (0.999) idna (2.5) imagesize (0.7.1) ipykernel (4.6.1) ipython (5.3.0) ipython-genutils (0.2.0) ipywidgets (7.0.0) isort (4.2.5) itsdangerous (0.24) jdcal (1.3) jedi (0.10.2) Jinja2 (2.9.6) jsonschema (2.6.0) jupyter (1.0.0) jupyter-client (5.0.1) jupyter-console (5.1.0) jupyter-core (4.3.0) jupyterlab (0.26.5) jupyterlab-launcher (0.4.0) jupyterlab-widgets (0.6.15) lazy-object-proxy (1.2.2) llvmlite (0.18.0) locket (0.2.0) lxml (3.7.3) MarkupSafe (0.23) matplotlib (2.0.2) missingno (0.3.7) mistune (0.7.4) mpmath (0.19) msgpack-python (0.4.8) multipledispatch (0.4.9) navigator-updater (0.1.0) nbconvert (5.1.1) nbformat (4.3.0) networkx (1.11) nltk (3.2.3) nose (1.3.7) notebook (5.0.0) numba (0.33.0) numexpr (2.6.2) numpy (1.12.1) numpydoc (0.6.0) odo (0.5.0) olefile (0.44) openpyxl (2.4.7) packaging (16.8) pandas (0.20.1) pandas-profiling (1.4.0) pandocfilters (1.4.1) partd (0.3.8) pathlib2 (2.2.1) patsy (0.4.1) pep8 (1.7.0) pexpect (4.2.1) pickleshare (0.7.4) Pillow (4.1.1) pip (9.0.1) pivottablejs (0.8.0) ply (3.10) prompt-toolkit (1.0.14) psutil (5.2.2) ptyprocess (0.5.1) py (1.4.33) pycosat (0.6.2) pycparser (2.17) pycrypto (2.6.1) pycurl (7.43.0) pyflakes (1.5.0) Pygments (2.2.0) pylint (1.6.4) pyodbc (4.0.16) pyOpenSSL (17.0.0) pyparsing (2.1.4) pytest (3.0.7) python-dateutil (2.6.0) pytz (2017.2) PyWavelets (0.5.2) PyYAML (3.12) pyzmq (16.0.2) QtAwesome (0.4.4) qtconsole (4.3.0) QtPy (1.2.1) requests (2.14.2) rope-py3k (0.9.4.post1) scikit-image (0.13.0) scikit-learn (0.18.1) scipy (0.19.0) seaborn (0.7.1) setuptools (27.2.0) simplegeneric (0.8.1) singledispatch (3.4.0.3) six (1.10.0) snowballstemmer (1.2.1) sortedcollections (0.5.3) sortedcontainers (1.5.7) Sphinx (1.5.6) spyder (3.1.4) SQLAlchemy (1.1.9) statsmodels (0.8.0) sympy (1.0) tables (3.3.0) tblib (1.3.2) terminado (0.6) testpath (0.3) toolz (0.8.2) tornado (4.5.1) traitlets (4.3.2) unicodecsv (0.14.1) wcwidth (0.1.7) Werkzeug (0.12.2) wheel (0.29.0) widgetsnbextension (3.0.2) wrapt (1.10.10) xlrd (1.0.0) XlsxWriter (0.9.6) xlwings (0.10.4) xlwt (1.2.0) zict (0.1.2) `

pbugnion commented 7 years ago

@EzraYang Thanks for raising an issue here. I've opened a new issue (issue #178 ) with your error -- I don't think it's related to this issue.

I've also deleted your comment as it leaked your Google API key in the traceback (just editing the comment isn't enough as GitHub keeps older versions).

pbugnion commented 7 years ago

@tespintom gmaps 0.5.4 is not compatible with ipywidgets 7.0.0. Upgrade to the latest version of gmaps (currently 0.6.1) by following the installation instructions. Let us know how it goes!

tespintom commented 7 years ago

@pbugnion i just upgraded to 0.6.1 and still having the same issues. any thoughts? Thanks

pbugnion commented 7 years ago

Thanks for trying! I develop gmaps on basically the same versions of Jupyter notebook and widgets as what you're running, so not sure what's going wrong.

Can you open the JavaScript console in your browser, refresh the page, execute a cell that creates a widget, and paste / screenshot the output here? It would be great if you could put the entire content of the console, not just error lines.

tespintom commented 7 years ago

`// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. "use strict"; var _ = require('underscore'); var utils = require('./utils'); var semver = require('semver'); var widget_string_1 = require('./widget_string'); /**

////////////////// // WEBPACK FOOTER // ./~/jupyter-js-widgets/lib/manager-base.js // module id = 6 // module chunks = 0`

tespintom commented 7 years ago

I hope that is what you looking for. Thanks

tespintom commented 7 years ago

screen shot 2017-08-31 at 4 09 29 pm

pbugnion commented 7 years ago

It looks like you're missing the Jupyter widgets JavaScript.

Did you run something like:

$ jupyter nbextension enable --py --sys-prefix widgetsnbextension

If you run that, then reload your notebook, you should see lines like this in your console:

screen shot 2017-08-31 at 21 14 15
tespintom commented 7 years ago

I have been looking into that, but once i ran that command, this is what i get:

`tomass-mbp:~ tomasespina$ jupyter nbextension enable --py --sys-prefix widgetsnbextension Enabling notebook extension jupyter-js-widgets/extension...

pbugnion commented 7 years ago

Make sure that you refresh the page (i.e. browser refresh) after you've run this. If that doesn't help, it might be a virtual environment problem? How did you install ipywidgets?

As a useful test, can you try to run some basic ipywidgets code:

import ipywidgets as widgets
widgets.IntSlider()

This should output a slider. If that doesn't work, the problem is with your widgets installation, rather than gmaps directly. That'll help isolate the issue somewhat.

(Edited to suggest running ipywidgets code)

tespintom commented 7 years ago

I am still having the same issues after refreshing and going form notebook to lab and back. It was working fine before upgraded to Jupyter 5.0, and use conda install

pbugnion commented 7 years ago

Can you try the ipywidgets code I mentioned in the comment before yours?

I suspect that your upgrade left you with a corrupt widgets installation (i.e. the Python part was upgraded, but the Javascript part wasn't, or at least not in the right place. Installing widgets can be a little tricky.). Happy to help debug widgets issues as well, but it would be good to make sure that that's actually the problem.

tespintom commented 7 years ago

Will do, sorry for the delayed response

On Sep 4, 2017, at 9:27 AM, Pascal Bugnion notifications@github.com wrote:

Can you try the ipywidgets code I mentioned in the comment before yours?

I suspect that your upgrade left you with a corrupt widgets installation (i.e. the Python part was upgraded, but the Javascript part wasn't, or at least not in the right place. Installing widgets can be a little tricky.). Happy to help debug widgets issues as well, but it would be good to make sure that that's actually the problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pbugnion/gmaps/issues/174#issuecomment-326963368, or mute the thread https://github.com/notifications/unsubscribe-auth/AX_3INSN35n3BFGhL7HKNrglu-1IGnglks5se_rEgaJpZM4PCt1k.

pbugnion commented 7 years ago

Closing as not reproducible. Feel free to reopen if this comes up again.

tespintom commented 7 years ago

Hi Pascal, I came back to reproduce the map and i am still having issues.
Anythoughts?

tespintom commented 7 years ago

print(gmaps.__version__) print(ipywidgets.__version__) i have the following versions 0.7.0 7.0.0

pbugnion commented 7 years ago

Can you try running this:

import ipywidgets as widgets
widgets.IntSlider()

You should see a slider.

It'll help decide whether the problem lies with your ipywidgets installation, or with gmaps.

tespintom commented 7 years ago

Hi Pascal Just did and same issue.

On Nov 14, 2017, at 2:36 AM, Pascal Bugnion notifications@github.com wrote:

import ipywidgets as widgets widgets.IntSlider()

pbugnion commented 7 years ago

In which case, this issue is the same as issue 1745 in ipywidgets. I would read through this and see what applies.

In particular, what is the output of jupyter nbextension list?

tespintom commented 7 years ago

HI Pascal When running Jupiter nbextension list I get the following problems found: nbextensions_configurator/config_menu/main enabled

On Nov 15, 2017, at 3:53 AM, Pascal Bugnion notifications@github.com wrote:

In which case, this issue is the same as issue 1745 https://github.com/jupyter-widgets/ipywidgets/issues/1745 in ipywidgets. I would read through this and see what applies.

In particular, what is the output of jupyter nbextension list?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pbugnion/gmaps/issues/174#issuecomment-344526373, or mute the thread https://github.com/notifications/unsubscribe-auth/AX_3INBjc2gZdAt9hI2K8BOPmCvbbuahks5s2qaRgaJpZM4PCt1k.

tespintom commented 7 years ago

Downgraded to 6.0 and it does not seem to work either. The file just kept running without spitting out the map.

On Nov 15, 2017, at 3:53 AM, Pascal Bugnion notifications@github.com wrote:

In which case, this issue is the same as issue 1745 https://github.com/jupyter-widgets/ipywidgets/issues/1745 in ipywidgets. I would read through this and see what applies.

In particular, what is the output of jupyter nbextension list?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pbugnion/gmaps/issues/174#issuecomment-344526373, or mute the thread https://github.com/notifications/unsubscribe-auth/AX_3INBjc2gZdAt9hI2K8BOPmCvbbuahks5s2qaRgaJpZM4PCt1k.

pbugnion commented 7 years ago

When running Jupiter nbextension list I get the following problems found

Is this the entire output of jupyter nbextension list? If so, you are missing all the extensions related to ipywidgets...

Downgraded to 6.0 and it does not seem to work either.

I strongly recommend not downgrading ipywidgets. The latest version of gmaps only supports ipywidgets 7.x. Downgrading on top of an already broken stack will only make it worse.

tespintom commented 7 years ago

Is not the entire output, Here you go, sorry about that:

3:00:55 tomasespina@tomass-mbp ~ $ jupyter nbextension list Known nbextensions: config dir: /Users/tomasespina/.jupyter/nbconfig notebook section jupyter-gmaps/extension enabled

On Nov 15, 2017, at 1:29 PM, Pascal Bugnion notifications@github.com wrote:

When running Jupiter nbextension list I get the following problems found

Is this the entire output of jupyter nbextension list? If so, you are missing all the extensions related to ipywidgets...

Downgraded to 6.0 and it does not seem to work either.

I strongly recommend not downgrading ipywidgets. The latest version of gmaps only supports ipywidgets 7.x. Downgrading on top of an already broken stack will only make it worse.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pbugnion/gmaps/issues/174#issuecomment-344684640, or mute the thread https://github.com/notifications/unsubscribe-auth/AX_3IBOEPTul3G_d84IeQtBTn4nJ0opNks5s2y2cgaJpZM4PCt1k.

pbugnion commented 7 years ago

You have two clashing installations of both jupyter widgets and gmaps -- one in your home directory and one system-wide.

I'd follow Jason's answer on the 16th October in this ipywidgets issue:

jupyter nbextension uninstall jupyter-gmaps
jupyter nbextension uninstall jupyter-js-widgets/extension
jupyter nbextension enable --py --sys-prefix gmaps
tespintom commented 7 years ago

Hello again There are too many conflicting files. So I decided to uninstall and clean anaconda and reinstall it again. After following your conda install instruction I get the following:

Failed to display Jupyter Widget of type Map. If you're reading this message in Jupyter Notebook or JupyterLab, it may mean that the widgets JavaScript is still loading. If this message persists, it likely means that the widgets JavaScript library is either not installed or not enabled. See the Jupyter Widgets Documentation https://ipywidgets.readthedocs.io/en/stable/user_install.html for setup instructions. If you're reading this message in another notebook frontend (for example, a static rendering on GitHub or NBViewer https://nbviewer.jupyter.org/), it may mean that your frontend doesn't currently support widgets.

Conda list ipywidgets 7.0.3 py36_1 conda-forge gmaps 0.7.0 py36_0 conda-forge widgetsnbextension 3.0.2 py36h91f43ea_1

10:25:11 tomasespina@tomass-mbp ~ $ jupyter nbextension list Known nbextensions: config dir: /Users/tomasespina/anaconda3/etc/jupyter/nbconfig notebook section jupyter-js-widgets/extension enabled

Thanks for the help

On Nov 16, 2017, at 3:35 AM, Pascal Bugnion notifications@github.com wrote:

You have two clashing installations of both jupyter widgets and gmaps -- one in your home directory and one system-wide.

I'd follow Jason's answer on the 16th October in this ipywidgets issue https://github.com/jupyter-widgets/ipywidgets/issues/1745:

uninstall the nbextension in /Users/tomasespina/.jupyter/nbconfig with jupyter nbextension uninstall --user jupyter-gmaps jupyter nbextension uninstall --user jupyter-js-widgets/extension uninstall the nbextension in /anaconda/etc/jupyter/nbconfig with: jupyter nbextension uninstall jupyter-gmaps jupyter nbextension uninstall jupyter-js-widgets/extension verify that the extensions are gone by running jupyter nbextension list again. Neither jupyter-gmaps nor jupyter-js-widgets should appear.

Make sure you are on the latest version of both ipywidgets (should be 7.x) and gmaps (should be 0.7.x) by running pip list. If not, install them with pip install -U ipywidgets gmaps.

Enable the jupyter-gmaps with:

jupyter nbextension enable --py --sys-prefix gmaps — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pbugnion/gmaps/issues/174#issuecomment-344851820, or mute the thread https://github.com/notifications/unsubscribe-auth/AX_3IPs8BxmBI0WVryIDTImAUNNn1rtMks5s2_PXgaJpZM4PCt1k.

dheeraj09D commented 11 months ago

Hi, I am getting this when running nbextensions list Known nbextensions: config dir: C:\Users\VenkataNaga.jupyter\nbconfig notebook section pydeck/extensionRequires enabled

I am getting the slider widget which you mentioned as a test correctly. I am not being able to display the gmaps.figure. Please reply as early as possible. I am not sure of what to do. My gmaps is 0.9.0 and ipywidgets is 8.1.1. I want to know how to display gmaps.figure object either in jupy notebook or html.

dheeraj09D commented 11 months ago

config: C:\Users\VenkataNaga.jupyter C:\Users\VenkataNaga\AppData\Roaming\Python\etc\jupyter C:\Users\VenkataNaga\AppData\Local\Programs\Python\Python311\etc\jupyter C:\ProgramData\jupyter data: C:\Users\VenkataNaga\AppData\Roaming\jupyter C:\Users\VenkataNaga\AppData\Roaming\Python\share\jupyter C:\Users\VenkataNaga\AppData\Local\Programs\Python\Python311\share\jupyter C:\ProgramData\jupyter runtime: C:\Users\VenkataNaga\AppData\Roaming\jupyter\runtime

Also this is the jupyter paths output.