-
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
TypeError: t.currentWidget.context.model.metadata.has is not a function with JupyterLab 4 #1054
Comments
Thanks @mgunyho for reporting this. At the moment I am not sure where this come from. Maybe it is the JupyterLab extension that we need to port to version 4? Can you try deactivating it with If you want to try and see if we can make the extension compatible with Jupyter Lab 4, this is what you would have to do
Let us know if either deactivating or porting to version 4.0.0 works! Thanks |
Hi, This seems to be indeed coming from jupytext, if I disable jupytext with I tried to install the extension locally with JupyterLab 4, but I couldn't get it to work. I changed the versions to output of pip install command
If I install with I also tried to run
when running the command in the root of the repo. If I run the same command in the folder Just to confirm, I also tried to install the extension with the package.json unchanged in a virtualenv with jupyterlab 3, and everything works fine there. So maybe porting to JL4 requires a bit more work? |
Okay, I followed the extension migration guide and ran the upgrade script using python -m jupyterlab.upgrade_extension . in the packages/labextension folder. This updated
along with about 50 other errors from |
I will try to work on this in the following weeks. I might use either the extension migration guide, or recode the extension from scratch using the extension tutorial (since it's a fairly basic extension). If I can, I will also try to provide the same Jupytext menu that we had in Jupyter Notebook. Also ideally I would prefer the extension logo to use the project logo, not my user picture 😄 @JasonWeill may I ask you how a rough estimate for how much time we have before Jupyter Lab 4.0 gets released ? I see that Meanwhile as noted above by @mgunyho the extension can be disabled using |
I guess this is why the jupytext commands not showing up in jupyterlab. Got confused when commands not shown like the docs said, until seeing this issue. |
@mwouts JupyterLab 4.0.0 was released this past Monday, May 15. |
I've seen this! And it matters a lot to me, but I also happen to have a full-time day job. I will see what I can do, but any help here would be much appreciated 😀 |
I am trying to follow the extension tutorial. Since the extension tutorial seems to require that the extension has its own repository, I have unarchived https://github.com/mwouts/jupyterlab-jupytext/ (Q: if I package the extension separately from The corresponding PR is mwouts/jupyterlab-jupytext#3, however I have not yet been able to test it. The command |
What is the exact error you see? |
Well I just gave it another try. If I run
In the above I notice a series of errors about
which is the same error as in the title of this issue! This probably means that most of the work involved in fixing the extension is about fixing NB: If it is correct that the fix will be mostly on |
Thanks for working on this. (made a pull request to, I believe, that effect: PR_1071) |
in case it is indeed helpful, please see this PR where the |
double-checking: I restarted from a freshly cloned repo, conda activate'd into an env that has jupyterlab 4.0.1 installed, and did jlpm install
pip install -e . |
about using a different icon I have asked the question on discourse here |
as far as I can tell this hacky first step works reasonably, at least I have not found any big glitch when giving it a quick try around the one thing that stood out though, is that when double-clicking in the file browser on a text-encoded notebook, it opens with the Editor and not as a Notebook at some point in time I had that working (I mean double clicking did open as a notebook) once I had put the following in place
however I am in no position right now to say if that was still working for me in jlab3 |
Hey @parmentelat , @ethanmsl , thank you this is super helpful! I will try to deliver an updated version tonight. More precisely, my plan is to
|
sounds great ! |
I have seen the tentative version of the extension working with Jupyter Lab 4 - thank you so much @parmentelat! This is how I installed it:
In the coming days, I would like to
|
as far as the first bullet, I have asked the jupyter discourse for insights: nothing ventured nothing gained ;) |
about bullet 1 (double-clicking opens a notebook instead of an editor or other preview) I managed to get that to work, doing the following
IMPORTANT NOTE it took me some time to figure that in my own case I also had the same settings in another file under cd
find .jupyter -type f | xargs grep defaultViewers
.jupyter/labconfig/default_setting_overrides.json: "defaultViewers": {
.jupyter/lab/user-settings/@jupyterlab/docmanager-extension/plugin.jupyterlab-settings: "defaultViewers": { (see also https://discourse.jupyter.org/t/defining-jupytext-as-the-default-viewer-for-text-notebooks-under-jlab4/19730/2?u=parmentelat) |
Thank you @parmentelat , that is really promising! I hope I will be able to find some time in the coming days / week-end to finalize this. I think what is probably going to happen next is that we will move the JupyterLab extension for Jupytext in that other repository. There we would provide one version of the extension for JupyterLab 3 and one other for JupyterLab 4. NB: I wrote a detailed plan here |
It took me a long time to find this thread :) I found I was unable to uninstall the extension with |
hi @nattaylor also for the record the latest attempt at addressing this is in this PR |
Sorry, what I meant was that installation was successful with @mwouts 's fork and branch (mwouts/jupyterlab-jupytext.git@jupyterlab4) |
Hi @mwouts, |
This has been solved in Those who installed the temporary workaround will need to uninstall it. In other words, the new instructions are
|
Hello,
I was trying out JupyterLab 4 (4.0.0b0), and noticed that jupytext doesn't work. When I open JupyterLab, the browser console gets filled with the following error message several times:
console output
Also, if I open the command palette, the search doesn't work, and whenever I type something the error appears in the console.
This happens both on Firefox and Chrome.
I can reproduce this with an environment created from scratch:
If I leave out
--pre
frompip install jupyterlab
, I get jupyterlab 3.6.2 and this doesn't happen.I'm not familiar with extension development, I briefly tried to look through the jupyter extension migration guide, but I couldn't see anything obvious related to this.
I'm on ubuntu 20.04. Let me know if you need more information.
The text was updated successfully, but these errors were encountered: