Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

display(HTML(html)) doesn't display anything #11

Closed
FabricioProjects opened this issue Jul 18, 2017 · 17 comments
Closed

display(HTML(html)) doesn't display anything #11

FabricioProjects opened this issue Jul 18, 2017 · 17 comments

Comments

@FabricioProjects
Copy link

anyone could make the overview work in jupyter?
i followed all the readme files and at end the display doesn't display anything and don't give me any errors too... i'm missing something?

@bengiswex
Copy link

What browser are you using? #9 is about the visualizations not working in Safari and Firefox currently

@ccchang0111
Copy link

ccchang0111 commented Jul 18, 2017

I also have the same problem of nothing showed up, and I am using Chrome and macOS Sierra 10.12.5. The followings are the procedures I opened and ran the 'Overview_demo.ipynb':

  1. followed all the Setup from 1-3, even installed Bazel.
  2. opened/clicked the 'Overview_demo.ipynb' directly and it showed up on my Chrome browser. (I also tried using terminal to launch the notebook by: jupyter notebook)
  3. ran through each block successfully without any error message
  4. nothing happened or showed up ...

Awesome app and Thanks in advance!

@mstetter
Copy link

Same issue here, tried to run but nothing happens. so I tried with jupyter nbextension enable

config dir: /Users/USER/.jupyter/nbconfig notebook section facets enabled - Validating: problems found: - require? X facets

@FabricioProjects
Copy link
Author

I tried in both firefox and chrome. still don't show up the HTML display

@jameswex
Copy link
Contributor

First thing to check is that the visualization is working correctly in the browser you are trying (and for now just try Chrome due to issue 9). Verify that the demo page visualizations show up correctly (https://pair-code.github.io/facets/).

Then when you run all the cells in your jupyter notebook, check the chrome developers console for errors. Let me know of any errors you find.

Another thing to check is that the jupter nbextension install command placed facets-jupyter.html in the appropriate location. I installed jupyter locally (using pip3 install --user), and my facets-jupyter ends up placed at "~/.local/share/jupyter/nbextensions/facets-dist/facets-jupyter.html".

Since I installed jupyter locally, I ran "jupyter nbextension install --user facets-dist/" from the facets repo top-level dir to install the extension.

@woodrujm
Copy link

@jameswex This worked for me (on Chrome)

@mstetter
Copy link

mstetter commented Jul 18, 2017

My jupyter is an anaconda installation but 'jupyter nbextension install --user facets-dist/' places it into the local path not into anaconda. After manually copying everyting works fine. cp -r facets-dist ~/anaconda/share/jupyter/nbextensions/

looks awesome!

@jameswex
Copy link
Contributor

@mstetter thanks! would it install to the right location if you did the command without the --user?

@mstetter
Copy link

@jameswex No, unfortunately it did not do that. not sure why and how to specify the installation location. (anaconda is in my path and the default python)

@jameswex
Copy link
Contributor

@mstetter thanks for looking into it.

@FabricioProjects @ccchang0111 I have updated the readme for installing the jupyter nbextension (see aaf19b2). Can you see if the issue was the nbextension not being installed to the right location for your jupyter installation? If so, try manually copying it to the right location as per the readme and see if that fixes the issue.

@FabricioProjects
Copy link
Author

@jameswex The manual copy of the facets-dist/ directory to the right path inside the anaconda environment works! Need to use Chrome. I'm closing this issue, ty all!

@ccchang0111
Copy link

It worked! I was using Canopy. So manually copy the folder to Enthough/Canopy/edm/envs/User/share/jupyter/nbextensions

@liya2001
Copy link

It doesn't display anything, I met this mistake:
VM630:197 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined
at HTMLElement._setAttributeToProperty (eval at globalEval (jquery.min.js:4), :197:187)
at HTMLElement._attributeChangedImpl (eval at globalEval (jquery.min.js:4), :67:410)
at HTMLElement.attributeChangedCallback (eval at globalEval (jquery.min.js:4), :180:377)
at Object.applyElementScopeSelector (eval at globalEval (jquery.min.js:4), :130:171)
at HTMLElement._applyStyleProperties (eval at globalEval (jquery.min.js:4), :143:38)
at HTMLElement._updateStyleProperties (eval at globalEval (jquery.min.js:4), :140:434)
at HTMLElement._beforeAttached (eval at globalEval (jquery.min.js:4), :139:221)
at HTMLElement.attachedCallback (eval at globalEval (jquery.min.js:4), :6:288)
at HTMLDivElement. (jquery.min.js:5)
at init.domManip (jquery.min.js:5)


@lai-bluejay
Copy link

lai-bluejay commented Aug 1, 2017

i'm sorry that my ipynb display nothing.

I used the code like following:

# Display the facets overview visualization for this data
from IPython.core.display import display, HTML

HTML_TEMPLATE = """<link rel="import" href="/nbextensions/facets-dist/facets-jupyter.html" >
        <facets-overview id="elem"></facets-overview>
        <script>
          var data = {protostr};
          alert(data)
          alert(document.querySelector("#elem").protoInput);
          document.querySelector("#elem").protoInput = data;
          alert(document.querySelector("#elem").protoInput);
        </script>"""
html = HTML_TEMPLATE.format(protostr=protostr)
display(HTML(html))

and then it shows the error:

Javascript error adding output!
SyntaxError: Unexpected token ;
See your browser Javascript console for more details.

However, when i used facets-dive, it worked well.

@MeghanML
Copy link

MeghanML commented Feb 1, 2018

Hi everyone,

I have the same issue :
--> facets-dive works fine with the demo and with my data also ...!
but when I run facets-overview, with the demo data it doesn't display anything.

When adding the lines :
var data = {protostr};
alert(data)
alert(document.querySelector("#elem").protoInput);
document.querySelector("#elem").protoInput = data;
alert(document.querySelector("#elem").protoInput);

In the script (it helped for facets-dive) i get this message :

Javascript error adding output!
SyntaxError: Invalid or unexpected token
See your browser Javascript console for more details.

Do you know how to solve the issue ? and see the plots ?

Thank you very much for your help

@dantp-ai
Copy link

dantp-ai commented Dec 4, 2018

@MeghanML I have the same issue. Do you get the visualizations in facets-overview now?

@mlmlmk
Copy link

mlmlmk commented Mar 19, 2019

What browser are you using? #9 is about the visualizations not working in Safari and Firefox currently
Running on Chrome works for me.
Can't you believe that? I have the same problem and have spent 1 hour to solve this.
Thank you very much ! Next time if anything goes wrong, I will change the browser first.

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