voila icon indicating copy to clipboard operation
voila copied to clipboard

Voila and jupyterlab-github

Open djangoliv opened this issue 2 years ago • 2 comments

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

djangoliv avatar Jul 15 '22 13:07 djangoliv

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.

jtpio avatar Jul 19 '22 06:07 jtpio

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.

jtpio avatar Jul 19 '22 06:07 jtpio

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

screenchot

djangoliv avatar Jun 09 '23 13:06 djangoliv