Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
992 Discussions

Attempt to open HTML report with JupyterLab

I_Y_H
Novice
1,347 Views

Hi everyone,

Just wonder if anyone of you can successfully open and view HTML compilation/synthesis report with the Jupyter notebook?

Even if I clicked to "Trust HTML", what's been displayed is still a blank page with nothing in (see my screenshot).

Hints welcome

0 Kudos
1 Solution
I_Y_H
Novice
1,235 Views

Hi Gopika,

Thanks a lot for your hint.

I think I finally found a solution to this problem, as follows:

1. Switch to Firefox on your own machine;

2. In Linux terminal on the devcloud login node: 

jupyter notebook --generate-config

This will generate a jupyter configuration file at: 

~/.jupyter/jupyter_notebook_config.py

3. Modify two lines in "jupyter_notebook_config.py":

c.NotebookApp.allow_origin = ''
c.NotebookApp.allow_remote_access = True

 After the 3 steps above, open the Intel devcloud jupyter notebook in Firefox, and then right click on the "report.html" file to select "Open in New Browser Tab". The report should show up fine in a new tab thereafter.

Hope this works for people who suffered from the same issue as I did.

View solution in original post

7 Replies
Gopika_Intel
Moderator
1,328 Views

Hi,

Thank you for posting in Intel Communities. It seems the file you are opening, report.html, is empty. Please open the file via a terminal using the command:

terminal.png

 

vi report.html

 

or rename and open the file as report.txt to check whether the file is empty.

Eg. Opening a sample file using a.txt in JupyterLab

a_txt.jpg

Opening the same file after renaming it to a.html in JupyterLab

a_html.jpg

Hope this helps

Regards

Gopika

 

I_Y_H
Novice
1,323 Views

Hi Gopika,

Many thanks for the hints. I tried your hint like making a simple HTML example and it works like a charm, with or without trusting HTML.

But, for the compilation/synthesis report, trusting HTML will give a blank view while untrusting it give a few forms with no content. BTW, that report.html is not empty; it has loads of contents in. Any further comment on this, please? Thanks a lot in advance.

Regards,

Yuan

Gopika_Intel
Moderator
1,303 Views

Hi,

Thank you for the update. We could observe from the html code you attached that it contains not just html but snippets of javascript code and css. Such codes couldn’t be displayed in JupyterLab like done in normal browsers. Instead, please download the whole folder containing this html code and the rest of the associated files (eg. css) into your system and open the html code using the normal web browsers.

For more information please refer: https://stackoverflow.com/questions/28641160/displaying-an-html-file-with-a-js-inside-an-ipython-not...

Hope this helps

Regards

Gopika


I_Y_H
Novice
1,284 Views

Hi Gopika,

Thanks a lot for your feedback. I got it.

FYI, opening such HTML compilation/synthesis report through JupyterLab is recommended in one of the tutorials for DPC++ on FPGA. I think this is better modified to avoid confusion (or is there any workaround for this? from the one who made this tutorial?).

Regards,

Yuan

Gopika_Intel
Moderator
1,244 Views

Hi,

Thank you for the update. Please try adding %%HTML in the Jupyter Notebook before the line that executes the HTML. %%HTML helps import magic function that should work for css, jpg or code.

Regards

Gopika


I_Y_H
Novice
1,236 Views

Hi Gopika,

Thanks a lot for your hint.

I think I finally found a solution to this problem, as follows:

1. Switch to Firefox on your own machine;

2. In Linux terminal on the devcloud login node: 

jupyter notebook --generate-config

This will generate a jupyter configuration file at: 

~/.jupyter/jupyter_notebook_config.py

3. Modify two lines in "jupyter_notebook_config.py":

c.NotebookApp.allow_origin = ''
c.NotebookApp.allow_remote_access = True

 After the 3 steps above, open the Intel devcloud jupyter notebook in Firefox, and then right click on the "report.html" file to select "Open in New Browser Tab". The report should show up fine in a new tab thereafter.

Hope this works for people who suffered from the same issue as I did.

Gopika_Intel
Moderator
1,211 Views

Hi,

Thank you for the update . Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel

Regards

Gopika


Reply