voila
voila copied to clipboard
Voila and jupyterlab-github
I tried to use voila with jupyterlab-github but it doesn't work.
The problem is that voila want to save the notebook before render it, but it is not possible in this case (the files are in readonly mode)
Do you think that it is possible to render the notebook without saving in this case ?
Regards
Thanks @djangoliv for reporting.
Right the Voila Preview extension saves the document before opening the preview:
https://github.com/voila-dashboards/voila/blob/7d4ac99ac2e639d2fd7d38b9b4fff5364b34a5b2/packages/jupyterlab-preview/src/index.ts#L186
This should indeed handle read-only mode which can be the case also in other situations where a user can't write to the file system.
Marking this one as a good first issue.
Maybe a first simple approach would be to surround the call to context.save()
with a try
/ catch
block. And proceed with opening the preview anyway.
The problem is still present with jupyterlab-3.6.4 and voila 0.5.0a4
- install jupyterlab==3.6.5, jupyterlab-github and voila==0.5.0a4
- open a notebook with jupyterlab-github
- click on voila button
The rendering fail with the error: Repository is readonly