drivendataorg / drivendataorg/nbautoexport

Export works with Jupyter Notebook but not JupyterLab

Open
#81 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
87
Forks
10
PR merge metrics
No merged PRs in 30d

Description

* nbautoexport version: 0.3.1+7.gf539250
* Python version: 3.6.13
* Operating System: Ubuntu 18.04.5 LTS on AWS EC2 Instance

### Description
I newly installed and configured nbautoexport. New/modified jupyter notebooks in the configured directory are not getting exported as scripts on save when using Jupyter Lab.

### What I Did
I opened the same notebooks using Jupyter Notebook and they are exported as scripts on save. Interestingly, when I then go back to using Jupyter Lab, things are working as they should (new/modified notebooks are exported on save).

### Interim workaround
As of now, `nbautoexport` does not work with `jupyterlab` when the version of `nbclassic` is 4.0 or greater. To get both jupyterlab and jupyter notebook to work, run `pip install nbclassic=0.3.7` (earlier 0.3 versions also work)

### Long term fix
Write out to `~/.jupyter/jupyter_server_config.py` in addition to `~/.jupyter/jupyter_notebook_config.py`. After running `cp ~/.jupyter/jupyter_notebook_config.py ~/.jupyter/jupyter_server_config.py`, both jupyter lab and jupyter notebook export scripts correctly regardless of the version of `nbclassic`
- Related issue in `nbclassic`: [link](https://github.com/jupyter/nbclassic/issues/136)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.