Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1690 Discussions

Attempt to open HTML report with JupyterLab

I_Y_H
New Contributor I
7,307 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
New Contributor I
7,195 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

0 Kudos
8 Replies
Gopika_Intel
Moderator
7,288 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

 

0 Kudos
I_Y_H
New Contributor I
7,283 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

0 Kudos
Gopika_Intel
Moderator
7,263 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-notebook

Hope this helps

Regards

Gopika


0 Kudos
I_Y_H
New Contributor I
7,244 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

0 Kudos
Gopika_Intel
Moderator
7,204 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


0 Kudos
I_Y_H
New Contributor I
7,196 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.

0 Kudos
JianeChen
Beginner
5,012 Views

Hi,

 

Not sure how it didn't work at first when I did step2.

JianeChen_1-1687076731070.png

I got the above error. 

 

To solve this, I entered "pip3 install jupyter", then "jupyter notebook" to update the notebook.

I then tried step2 again, fortunately, it worked.

 

However, after modifying the configuration file, I still cannot open the HTML file. Do you have any idea how this can be solved?

 

Hope this helps.

 

 

0 Kudos
Gopika_Intel
Moderator
7,171 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