mmacieje
(Mmacieje)
February 14, 2020, 4:40pm
1
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ł.
ozapatam
(Omar Zapata )
February 17, 2020, 9:07am
2
Hello @mmacieje
maybe @pmrowczy or @pkothuri can help us?
cheers
etejedor
(Enric Tejedor Saavedra)
February 17, 2020, 9:20am
3
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).
pmrowczy
(Piotr Mrowczynski)
February 17, 2020, 9:32am
4
@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.
mmacieje
(Mmacieje)
February 17, 2020, 10:32am
5
@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ł.
ozapatam
(Omar Zapata )
February 17, 2020, 10:33am
6
Hello Michal,
we found the issue and the problem is that nbconvert is taking tornado from the docker image and not from cvmfs
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
mmacieje
(Mmacieje)
February 17, 2020, 10:46am
7
Hello Omar,
great, thank you! This is a very useful feature for us.
Cheers, Michał.
mmacieje
(Mmacieje)
February 25, 2020, 10:45am
8
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ł.
dalvesde
(Diogo Castro)
February 25, 2020, 11:04am
9
Hi Michal,
The update hasn’t been pushed yet. We will notify you when we do.
Cheers,
Diogo
mmacieje
(Mmacieje)
March 17, 2020, 10:41am
10
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ł.