nbclassic
nbclassic copied to clipboard
jupytext still not working (content handlers still seem to be bypassed).
#147 was fixed with #148 but nbclassic still downloads .py
files instead of opening via jupytext as referred to in #147. Is there something that jupytext should be doing differently?
.py
opens fine for me on nbclassic. Can you bring more details on how you are using jupytext and how you come to a download? Thx.

I just tested again:
$vf new jupytest # create virtual environment
$pip install jupyterlab nbclassic
$pip install jupytext
$touch test.py
$jupyter nbclassic
If I open the test.py file in the notebook window I get the browser save file dialog. (This is firefox on linux). I also tried a different py file which was previously linked to a notebook and I get the same.
Output of jupyter labextensions list
:
JupyterLab v3.4.8
/home/jschrod/.virtualenvs/jupytexttest/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
jupyterlab-jupytext v1.3.8+dev enabled OK (python, jupytext)
/usr/share/jupyter/labextensions
jupyter-matplotlib v0.10.5 enabled OK
(it seems some of my system extensions still get picked up, but that should not really be a problem should it?)
Output of jupyter nbextensions list
:
Known nbextensions:
config dir: /home/jschrod/.virtualenvs/jupytexttest/etc/jupyter/nbconfig
notebook section
jupytext/index enabled
- Validating: OK
config dir: /etc/jupyter/nbconfig
notebook section
jupyter-matplotlib/extension enabled
- Validating: OK
rise/main enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
Which is relevant for nbclassic btw, labextensions or nbextensions?
There may be side-effects due to jupyterlab or jupytext, not sure. I have double checked and Firefox on MacOs opens correctly the py files. jupyter labextensions
is for jupyterlab, for latests nbclassic, you have to use jupyter nbclassic-extension list
. To be sure, can you post which version you have jupyter nbclassic --version
jupyter nbclassic-extension list
Known nbextensions:
config dir: /Users/echarles/opt/miniconda3/envs/notebook/etc/jupyter/nbconfig
notebook section
nbextensions_configurator/config_menu/main enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
tree section
nbextensions_configurator/tree_tab/main enabled
- Validating: OK
OK I just uninstalled all system files for jupyter and redid it and I still get the same result.
Output of jupyter nbclassic-extension list
Known nbextensions:
config dir: /home/jschrod/.virtualenvs/jupytext2/etc/jupyter/nbconfig
notebook section
jupytext/index enabled
- Validating: OK
jupyter nbclassic --version
is 0.4.5
In chromium .py
files open as text files.
This is running arch linux with python 3.10
Hi, I'm also facing the same issue.
nbclassic got updated to 0.4.8 in my Jupyter environment and since then, jupytext doesn't work properly as python files .py
open now in a text format instead of opening in a notebook format despite having the notebook icon next to the files.
Current situation
Packages version :
jupytext 1.14.4 pyhcff175f_0
nbclassic 0.4.8 pyhd8ed1ab_0
Notebook icon next to .py
file :
.py
file open in text format (not even in the "Edit" view of nbclassic, just as a basic text file in the web browser default view) :
Previous situation
With the previous version of nbclassic 0.2.7
installed in my environment , jupytext was working fine.
Packages version :
jupytext 1.14.4 pyhcff175f_0
nbclassic 0.2.7 pyhd8ed1ab_0
Notebook icon next to .py
file :
.py
file open in notebook format :