Saving notebook as an HTML file to EOS

Hello,

I am running an analysis notebook with spark (NXCALS). I’d like to save completed notebook as an html file to EOS. What would be the advised way of doing so. In case I don’t use spark, I can execute the following command:

notebook_name = 'SaveNotebookAsHTMLToEOS.ipynb'
file_name = 'SaveNotebookAsHTMLToEOS.html'
import sys
!{sys.executable} -m jupyter nbconvert --to html $notebook_name --output /eos/project/l/lhcsm/$file_name

However, in case I am connected with spark, I got an error as shown here: https://gitlab.cern.ch/LHCData/lhc-sm-apps/blob/master/hwc/SaveNotebookAsHTMLToEOS.ipynb

Thank you for any piece of advice you can offer.

Cheers, Michał.

Hello @mmacieje

maybe @pmrowczy or @pkothuri can help us?

cheers

Hi Michal,

Perhaps @pmrowczy can comment on the Spark error, but from the notebook interface you can also select to download a given notebook as HTML (File->Download as->HTML).

@etejedor @ozapatam I think the goal here is to save directly to EOS, not to your ~/Downloads folder as with Download As button. So @mmacieje needs programmatically to do that, we will have a look.

@etejedor, @ozapatam, @pmrowczy
Indeed, the goal is to programatically write a final html file to the EOS project space.

Many thanks in advance for looking into that.

Cheers, Michał.

Hello Michal,
we found the issue and the problem is that nbconvert is taking tornado from the docker image and not from cvmfs

image

This week we will deploy the new version of SWAN in production and the issue will be fixed.

But nbconvert is working for the terminal of swan, the issue is only with the notebook.
if you want to can to use the terminal for this at the moment.

Cheers

Hello Omar,

great, thank you! This is a very useful feature for us.

Cheers, Michał.

Hello,

I tried again to save a notebook as an HTML file. The issue seems still to be there.
Could you please kindly cross-check that?

Thank you in advance, Michał.

Hi Michal,
The update hasn’t been pushed yet. We will notify you when we do.
Cheers,
Diogo

Hi Diogo,

is there any update?
We moved to executing more and more notebooks for which automatic generation of reports would be a huge time saver.

Thank you in advance for your time and consideration.

Cheers, Michał.