Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

GoogleMap widget not loading #520

Open
Paul-Yuchao-Dong opened this issue Oct 22, 2016 · 12 comments
Open

GoogleMap widget not loading #520

Paul-Yuchao-Dong opened this issue Oct 22, 2016 · 12 comments

Comments

@Paul-Yuchao-Dong
Copy link

New to the widgets and I think it is a great idea. I was introduced to the widget by the talk Youtube link by Peter Parente, Gino Bustelo, Justin Tyberg | Turning Jupyter Notebooks into Data Applications.

So I downloaded the notebooks and installed the declarative widgets and dashboard layout extension.

Some WebComponents shipped with the installation package, but my guess is googlemap was not among them.

so when I try to run:

%%html
<link rel="import" href="urth_components/google-map/google-map.html" is='urth-core-import' package='GoogleWebComponents/google-map'>
<link rel="import" href="urth_components/google-map/google-map-marker.html" is='urth-core-import' package='GoogleWebComponents/google-map'>

I got below message:
404 POST /urth_import (127.0.0.1) 2.30ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
bower = 1.7.9
node = 4.x
anaconda with python=3.5

I didn't use docker script by the way, because I still haven't quite make it part of my workflow.

Any help? I'm happy to help run any diagnoses and post error message here.

Thanks!

@peller
Copy link
Collaborator

peller commented Oct 25, 2016

@Paul-Yuchao-Dong: any messages on the server console?

@Paul-Yuchao-Dong
Copy link
Author

@peller thank you for the reply! I observed both the error message from the chrome console log and the terminal where I ran jupyter notebook. The terminal message was longer as I posted here. the Chrome console had a similar error message 404 POST, otherwise no further detail. I shall post it as well when I get to my machine this evening.

@lbustelo
Copy link
Collaborator

@Paul-Yuchao-Dong are you only having a problem with google-maps or are no Polymer widgets rendering.

@Paul-Yuchao-Dong
Copy link
Author

@lbustelo Sorry for the late reply. I can confirm that some Polymer widgets are rendering, like the viz-table in urth_components/urth-viz-table/urth-viz-table.html as well as the bar chart.

So initially I thought bower was not installed properly, so I uninstalled the declarative widget, re-installed bower and re-installed the widget, but to no avail. Let me know if I can provide any further information. I think the widget idea of making the kernel function available to the front end is great! I hate to make part of the logic in JS and part in python, really difficult to keep track.

@peller
Copy link
Collaborator

peller commented Oct 29, 2016

@Paul-Yuchao-Dong: can you include the output from the shell where you run the notebook?

@Paul-Yuchao-Dong
Copy link
Author

@peller sorry for the late reply. the notebook shell where I ran

%%html
<link rel="import" href="urth_components/google-map/google-map.html" is='urth-core-import' package='GoogleWebComponents/google-map'>
<link rel="import" href="urth_components/google-map/google-map-marker.html" is='urth-core-import' package='GoogleWebComponents/google-map'>

produced no output. However, console error messages are:

POST http://localhost:8888/urth_import 404 (Not Found)

screenshot from 2016-10-29 09-13-38

Many thanks for your help! Sorry again for not replying early.

@peller
Copy link
Collaborator

peller commented Oct 29, 2016

@Paul-Yuchao-Dong looking for the server-side logs

@Paul-Yuchao-Dong
Copy link
Author

@peller thank you for your help! I don't really know which parts are relevant - a bit overwhelming the server side prompts. So I pasted all of them here:

Created new window in existing browser session.
[W 11:21:39.193 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-table/urth-viz-table.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-table/urth-viz-table.html
[W 11:21:39.203 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-table/urth-viz-table.html (127.0.0.1) 11.23ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 11:21:39.279 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map.html
[W 11:21:39.281 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map.html (127.0.0.1) 2.49ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 11:21:39.283 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map-marker.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map-marker.html
[W 11:21:39.284 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map-marker.html (127.0.0.1) 2.34ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 11:21:39.327 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/paper-input/paper-input.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/paper-input/paper-input.html
[W 11:21:39.329 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/paper-input/paper-input.html (127.0.0.1) 2.21ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 11:21:39.368 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-bar/urth-viz-bar.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-bar/urth-viz-bar.html
[W 11:21:39.369 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-bar/urth-viz-bar.html (127.0.0.1) 1.93ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[I 11:21:39.512 NotebookApp] Kernel started: f877d676-9646-44c6-9c07-dffaffc48b51
[W 11:21:39.541 NotebookApp] 404 GET /kernelspecs/Python%20[Root]/logo-64x64.png (127.0.0.1) 3.51ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 11:21:40.129 NotebookApp] 404 GET /urth_components/urth-core-behaviors/jupyter-notebook-env.html (127.0.0.1) 1.32ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 11:21:40.977 NotebookApp] 404 GET /static/does/not/exist.js?v=20161029112107 (127.0.0.1) 3.05ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb

Thanks!

@peller
Copy link
Collaborator

peller commented Oct 29, 2016

Any idea why the "Kernel started" message appears after your requests? Where is the start of the log?

Just to make sure -- is declarativewidgets.init() called in your notebook?

@Paul-Yuchao-Dong
Copy link
Author

@peller sorry for the confusion - Kernel started message appears after I started Jupyter, so it is not a result of the requests.

To avoid any future confusions, let me explain what I've done. I started jupyter, and opened the notebook that is accompanying the talk by Peter Parente, Gino Bustelo, Justin Tyberg on Turning Jupyter Notebooks into Data Applications. the link of the notebook is here.

And I ran all the cells. Please find all the terminal logs as below:

[W 10:38:31.768 NotebookApp] Unrecognized JSON config file version, assuming version 1
[W 10:38:31.770 NotebookApp] Collisions detected in jupyter_notebook_config.py and jupyter_notebook_config.json config files. jupyter_notebook_config.json has higher priority: {
      "NotebookApp": {
        "nbserver_extensions": "{'jupyter_cms': True, 'urth.widgets.ext.urth_import': True, 'nb_conda': True, 'nb_anacondacloud': True, 'nbpresent': True} ignored, using {'jupyter_nbextensions_configurator': True}"
      }
    }
[I 10:38:32.389 NotebookApp] [nb_conda_kernels] enabled, 3 kernels found
[I 10:38:32.460 NotebookApp] Loaded extension jupyter_nbextensions_configurator
[I 10:38:32.462 NotebookApp] Serving notebooks from local directory: /home/paul/Notebook
[I 10:38:32.462 NotebookApp] 0 active kernels 
[I 10:38:32.462 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 10:38:32.462 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Created new window in existing browser session.
[W 10:38:51.113 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-table/urth-viz-table.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-table/urth-viz-table.html
[W 10:38:51.121 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-table/urth-viz-table.html (127.0.0.1) 8.08ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:51.206 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map.html
[W 10:38:51.207 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map.html (127.0.0.1) 2.00ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:51.210 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map-marker.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map-marker.html
[W 10:38:51.211 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/google-map/google-map-marker.html (127.0.0.1) 1.77ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:51.267 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/paper-input/paper-input.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/paper-input/paper-input.html
[W 10:38:51.268 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/paper-input/paper-input.html (127.0.0.1) 1.65ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:51.314 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-bar/urth-viz-bar.html (127.0.0.1): No such file or directory: tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-bar/urth-viz-bar.html
[W 10:38:51.316 NotebookApp] 404 GET /notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/urth_components/urth-viz-bar/urth-viz-bar.html (127.0.0.1) 1.80ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[I 10:38:51.440 NotebookApp] Kernel started: 0a9931a2-e21c-495d-9e3d-5630c0c0aa63
[W 10:38:51.465 NotebookApp] 404 GET /kernelspecs/Python%20[Root]/logo-64x64.png (127.0.0.1) 3.98ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:51.906 NotebookApp] 404 GET /urth_components/urth-core-behaviors/jupyter-notebook-env.html (127.0.0.1) 2.01ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:53.490 NotebookApp] 404 GET /static/does/not/exist.js?v=20161030103832 (127.0.0.1) 2.05ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:53.508 NotebookApp] 404 GET /nbextensions/declarativewidgets/urth_components/google-map/google-map.html (127.0.0.1) 8.05ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:53.514 NotebookApp] 404 GET /nbextensions/declarativewidgets/urth_components/google-map/google-map-marker.html (127.0.0.1) 4.72ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:54.033 NotebookApp] 404 POST /urth_import (127.0.0.1) 2.81ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:38:54.036 NotebookApp] 404 POST /urth_import (127.0.0.1) 2.07ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[IPKernelApp] ERROR | Traceback (most recent call last):
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 48, in _the_function
    return reduce(lambda x, y: getattr(x, y), [self.shell.user_ns[name.pop(0)]] + name)
KeyError: 'est_table'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 67, in _sync_state
    signature = signature_spec(self._the_function())
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 51, in _the_function
    self.function_name))
declarativewidgets.urth_exception.UrthException: Invalid function name est_table

[IPKernelApp] ERROR | Traceback (most recent call last):
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 48, in _the_function
    return reduce(lambda x, y: getattr(x, y), [self.shell.user_ns[name.pop(0)]] + name)
KeyError: 'median_violation_counts'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 67, in _sync_state
    signature = signature_spec(self._the_function())
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 51, in _the_function
    self.function_name))
declarativewidgets.urth_exception.UrthException: Invalid function name median_violation_counts

[IPKernelApp] ERROR | Traceback (most recent call last):
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 48, in _the_function
    return reduce(lambda x, y: getattr(x, y), [self.shell.user_ns[name.pop(0)]] + name)
KeyError: 'sample_comments'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 67, in _sync_state
    signature = signature_spec(self._the_function())
  File "/home/paul/anaconda3/lib/python3.5/site-packages/declarativewidgets/widget_function.py", line 51, in _the_function
    self.function_name))
declarativewidgets.urth_exception.UrthException: Invalid function name sample_comments

[W 10:39:03.586 NotebookApp] 404 POST /urth_import (127.0.0.1) 2.00ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb
[W 10:39:03.589 NotebookApp] 404 POST /urth_import (127.0.0.1) 1.31ms referer=http://localhost:8888/notebooks/tutorial-dashboards-declarativewidgets/notebooks/inspection/inspection_dashboard_complete.ipynb

I checked the code and declarativewidgets.init() was called. For the Kernel started message, I suspect that's when the python3 kernel started. Thank you again for your time to help me figure out this.

@peller
Copy link
Collaborator

peller commented Oct 31, 2016

Thanks, @Paul-Yuchao-Dong. I suspect there's some installation or versioning problem. How did you install the notebook and which kernel are you using? I see a message near the top of the logs about collisions. It sounds like urth_import doesn't get loaded, which would explain the failure to install the linked widgets.

I am able to load the notebook and resolve the google-map widgets, however a blank rect appears because somehow the API key needs to be added (doesn't sound like you got that far)

cc @jtyberg @lbustelo

@lbustelo
Copy link
Collaborator

lbustelo commented Dec 7, 2016

I've seen the key error appear from time to time. Not sure what causes it. @Paul-Yuchao-Dong where you able to get pass this problem?

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

No branches or pull requests

3 participants