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

urth-viz-* widgets not working #521

Open
adamjoshuagray opened this issue Nov 6, 2016 · 4 comments
Open

urth-viz-* widgets not working #521

adamjoshuagray opened this issue Nov 6, 2016 · 4 comments

Comments

@adamjoshuagray
Copy link

I'm having trouble getting declarative widgets to work. I'm running in a python3 virtual env on Ubuntu.

>pip freeze 

cycler==0.10.0
decorator==4.0.10
entrypoints==0.2.2
ipykernel==4.5.0
ipython==5.1.0
ipython-genutils==0.1.0
ipywidgets==5.2.2
Jinja2==2.8
jsonschema==2.5.1
jupyter==1.0.0
jupyter-client==4.4.0
jupyter-console==5.0.0
jupyter-core==4.2.0
jupyter-declarativewidgets==0.7.0
MarkupSafe==0.23
matplotlib==1.5.3
mistune==0.7.3
nbconvert==4.2.0
nbformat==4.1.0
notebook==4.2.3
numexpr==2.6.1
numpy==1.11.2
pandas==0.19.1
patsy==0.4.1
pexpect==4.2.1
pickleshare==0.7.4
pkg-resources==0.0.0
prompt-toolkit==1.0.8
ptyprocess==0.5.1
Pygments==2.1.3
pyparsing==2.1.10
python-dateutil==2.5.3
pytz==2016.7
pyzmq==16.0.0
qtconsole==4.2.1
scikit-learn==0.18
scipy==0.18.1
seaborn==0.7.1
simplegeneric==0.8.1
six==1.10.0
sklearn==0.0
statsmodels==0.6.1
terminado==0.6
tornado==4.4.2
traitlets==4.3.1
wcwidth==0.1.7
widgetsnbextension==1.2.6

I have also run jupyter nbextension enable --py --sys-prefix widgetsnbextension and jupyter declarativewidgets quick-setup --sys-prefix.

I have then setup a notebook and run:

import declarativewidgets as declwidgets
declwidgets.init()

and

%%html
<link rel='import' href='urth_components/paper-slider/paper-slider.html'
        is='urth-core-import' package='PolymerElements/paper-slider'>
<paper-slider></paper-slider>

works. As in the slider shows up. However if I run

%%html
<urth-viz-bar>
    datarows='[["a",8,5],["b",2,6],["c",5,7]]'
    columns='["Index","Series 1","Series 2"]'>
</urth-viz-bar>

the result is (in text): datarows='[["a",8,5],["b",2,6],["c",5,7]]' columns='["Index","Series 1","Series 2"]'> which is not what I would have expected.

Its much the same even if I switch it to urth-viz-table.

I the chrome dev console I can see these two errors:

http://localhost:8888/static/does/not/exist.js?v=20161106093541 Failed to load resource: the server responded with a status of 404 (Not Found)

http://localhost:8888/nbextensions/widgets/widgets/js/widget.js?v=20161106093541 Failed to load resource: the server responded with a status of 404 (Not Found)

I would think that there is maybe some problem with ipywidgets getting enabled. When I switch on debug logging on jupyter I can see it is loading config from /home/adam/python3/venv/etc/jupyter/jupyter_notebook_config.json which looks like:

{
  "NotebookApp": {
    "nbserver_extensions": {
      "urth.widgets.ext.urth_import": true
    }
  }
}

I also see this warning in the logs and I'm not sure if it is relevent:

/home/adam/python3/venv/lib/python3.5/site-packages/urth/widgets/__init__.py:7: UserWarning: The `urth` package name is deprecated. Will be removed in version 0.7.0. Use 'declarativewidgets' instead.
  warn("The `urth` package name is deprecated. Will be removed in version 0.7.0. "

I am aware of the other issues such as 297 but they but issue seems slightly different.

@peller
Copy link
Collaborator

peller commented Nov 6, 2016

<urth-viz-bar>
    datarows='[["a",8,5],["b",2,6],["c",5,7]]'
    columns='["Index","Series 1","Series 2"]'>
</urth-viz-bar>```

Looks like a syntax error. datarows and columns should be attributes on urth-viz-bar You've got a > closing the tag with those attributes as inner text.

@adamjoshuagray
Copy link
Author

adamjoshuagray commented Nov 6, 2016

Ok my bad but when I remove it it is just blank output still with the errors.
*edit: I have tried this on another computer and still have the problem. (essentially the same setup).

@peller
Copy link
Collaborator

peller commented Nov 7, 2016

The Urth deprecation warning is not relevant. Could you please provide full logs from the notebook server?

@lbustelo
Copy link
Collaborator

lbustelo commented Dec 7, 2016

@adamjoshuagray Still having issues?

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