-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension not loading in jupyterlab 3 #713
Comments
I had done the manual labextension install. I was jumping backwards and forwards between 2.2 and 3.0 trying to figure out what wasn't working. I figured I needed to explicitly upgrade the labextension from 1.2.2 at the same time as upgrading jupyterlab. I have just tried removing jupyter, jupyterlab and jupytext and starting again. Behavior is the same. I also installed jupyter_offlinenotebook and explicitly enabled the jupyterlab server extension to make my * list output more similar. It is still not loading. I am assuming nbreuse and nteract won't be having any impact. Yes the jupytext pair commands show up.
|
Thanks for the update. So the problem is with the server extension, which only role is to replace the contents manager with Jupytext's one. Can you confirm that you don't see any log like
when you run Note that, in case we don't find out immediately how to solve this issue with the server extension, you still have the possibility to set the contents manager in your Jupyter config, see https://jupytext.readthedocs.io/en/latest/install.html#jupytext-s-contents-manager |
This is what I get on startup. The relevant line is missing.
Unfortunately adding the below line to .jupyter/jupyter_notebook_config.py is one of the things I have already tried. It seems to have no effect.
|
It occurred to me that perhaps I should be putting the above line in .jupyter/jupyter_lab_config.py since I am running jupyter lab This finally made something happen:
|
Arg this is becoming very technical... do you notice this?
This is something that is taken care of by the Jupytext server extension: Of course we could reproduce that in your config file - something like
But I think that a better advice would be to get the server extension working. Would you mind to create a new environment / jupyter config from scratch? Personally I like very much conda/mamba for this, I'd create an
and run
(or |
Ok, I am making some progress. Both the conda environment and your suggested hack in the config file worked. So it looks like its something in my environment that is breaking things. This is the output from the conda environment.
I typically use pipenv for my virtual python environments, for what its worth, a fresh pipenv environment also works fine. I then tried dumping as many packages as I can easily get from my user environment into the virtual environment (i.e. without ubuntu python packages and packages not on pypi). Jupytext works like this too. So there is something subtle wrong with my user environment. I will see if a colleague can replicate my problem next week. |
Good news!
I agree. I think the point to investigate is why the Jupytext Server Extension is not loaded when you start Jupyter Lab - this is not consistent with what you have in |
My colleague can replicate it, although we have similar dev environments. I will try and see if it happens on a fresh Ubuntu 20 install but this may take a bit longer to find time for. It does work I am inclined to leave this issue since I have a couple of work-arounds. If it is broken on a new install I'll keep trying to find the root cause. |
Hi @gstorer , well I'll be happy to learn more about this - no hurry though. Sure we can keep this open, it can help other users if they face a similar issue. |
This appears to be an issue in the new jupyter_server and nbclassic (a layer to automatically shim extensions/managers from notebook to jupyter_server). An issue was just posted on nbclassic to handle custom manager classes working with jupyter_server and classic notebook's server. |
Thanks @Zsailer for the link. It is correct that the inheritance issue appeared above when we tried to set the contents manager manually (as seen above, a workaround is to use the However I am afraid that this is not the main issue in @gstorer's report here. I'd say that the main issue is this: according to |
Hi, I had the same problem reported by @gstorer and I have solved it. I have jupyterlab < 3 and jupytext and all was fine. When I upgraded to jupyterlab 3.0 jupytext was not enabled any more. No improvement with enabling / disabling jupytext in the various extensions (labextension, nbextension, serverextension), no improvement with reinstalling from scratch. I removed all user-installed extensions and installed from scratch, in my Linux Fedora 32 and even that did not work. I started a new environment using pipenv, and that worked. I checked what was different and found that:
The problem apparenly is due to the configuration not being updated to a new format. I guess that all the trouble just comes from me having the file ~/.jupyter/jupyter_notebook_config.json in my user config folder. Probably, deleting it and reinstalling would also work, but I did not double check. What is working for me is having deleted ~/.jupyter/jupyter_notebook_config.json and added the folder ~/.jupyter/jupyter_notebook_config.d from the pipenv config folder. I hope that this could help fixing personal installations and give a hint on what goes wrong in the installation procedure. |
Thank you @alusiani for the detailed information, that is very helpful! Yes apparently in the new config we don't need to mention In my local JupyterLab 3 install what I have is this:
and my @martinRenou , are you aware of such a change in the Jupyter configuration system? Do you know how to properly address the configuration update / and why the previous configuration seems to be left behind? Thanks! |
Thanks @alusiani. This also solved my problem. Removing the ~/.jupyter directory and re-installing does not solve the problem for me. This was one of the first things I tried and I re-confirmed it this morning. After an uninstall/reinstall my .jupyter directory is almost empty. Ominously there is a ~/.jupyter/migrated file that contains the install date. Running the command |
Small update: the ~/.jupyter/migrated file was because of a old ~/.ipython directory I had from some time ago. I removed the old directory and reinstalled jupyter/ipython and the migrated file no longer appears. The configuration for jupytext and jupyter is still not correct or working without manual intervention. |
I am not aware of that no |
Just wanted to register that I am affected by this bug as well, tried the various options and config hacks, pipenv too. I also had the migrated file and ~/.ipython and removed them and reinstalled. I can get the jupytext menu to appear in notebook but not in lab, and it doesn't appear to be functioning correctly and menu items create new ipynb's |
Hi @jarradh , thanks for reporting this issue. Could you please tell us what kind of icons you get for Also it is expected that you get the Jupytext sub menu in Jupyter Notebook only. In JupyterLab all that is available are the Jupyter Commands, under View / Activate Command Palette. Note that you can compare what you get locally with the screenshot in the documentation, and also compare with |
I just ran into this issue as well after installing This results in the modern directory based config to be put into tree ~/.local/etc/jupyter
.local/etc/jupyter
├── jupyter_notebook_config.d
│ ├── jupyterlab.json
│ ├── jupyter-server-proxy-notebookserverextension.json
│ └── jupytext.json
├── jupyter_server_config.d
│ ├── jupyterlab.json
│ ├── jupyter-server-proxy-jupyterserverextension.json
│ ├── jupytext.json
│ └── nbclassic.json But jupyter only looks for config in So in my case the workaround was just a |
I think that you finally understood what happened. I do have $HOME/.local/etc/jupyter/ but I had not realized until now. |
Well done @sbrunk! Thank you for your help in solving this long standing issue. Next week I will make sure I can now reproduce the issue (I guess a simple |
Yes, I ran this on a Ubuntu 21.04 machine with regular Python 3.9 installed via APT. |
@sbrunk , I confirm that I am able to reproduce the issue and your resolution. On Ubuntu 20.04, I have run
With the above I do get the configuration files for Jupytext in
but as you said, they are not effective because that path is not listed in
The workaround Another possibility seems to be
I think I'll open an issue on the Jupyter project to see what they recommend (I'll also ask if |
Hi everyone, I wanted to let you know that the issue should be solved in At the moment a RC candidate for
Could you please give it a try and confirm that it does solve the issue? |
I will try but I have to find the time... |
The issue is solved for me with jupyter_core==4.9.1 |
Just ran into this issue with jupyterlab 3.6 while developing an extension. Front end part was working but the server part did not although it appeared as enabled. |
In Jupyterlab 3.0.4 with Jupytext 1.9.1 on Ubuntu 20.04.1 LTS the filemanager does not appear to be loading. Specifically the log line that says the jupytext file manager loads in not showing up. I can use the console commands to pair a notebook but no additional files are saved. The GUI also does not show previously paired files as notebooks either.
I can use the most recent version of jupytext with jupyter notebook just fine. I can also downgrade to lab 2.2 and the old plugin and it works fine as well.
I have tried all variations of enabling and configuration files listed in the install documentation and nothing has worked. I am fairly sure there is a bug here but there's no error message so it is a bit hard to say.
Let me know if there's any more information I can provide.
Here's a little bit of additional debug info:
Contents of .jupyter/jupyter_notebook_config.json:
The text was updated successfully, but these errors were encountered: