-
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
Can't open the jupyter notebook after the jupytext installation #1020
Comments
Hello @cacoto , could you tell us more about how exactly you created your Python environment, and how you installed Jupytext? In particular, do you use a custom Jupyter configuration file? Also, which version of Jupyter are you using ( |
hitting the same issue @mwouts. This was simply Log below has some hashes/tokens/cookies/secrets cut out and replaced with
|
I agree it's a different specific error/traceback, but I thought they might be related given OP's To an uninformed eye it seems the jupyter api for parsing configs has been async-ified or at least changed significantly, which causes effectively the same error at various locations in the code depending on how/by what jupytext gets invoked. This is currently blocking me from my usual daily analysis workflow, so I would be keen to see it fixed ASAP, and of course I'm willing to help expedite a fix. Do you have an approximate idea of the cause? If not, i'll dig in and see if I can find the bug. |
I'm pretty sure i've narrowed this down to jupyter-server now using async classes: jupyter-server/jupyter_server#1044 Will attempt to disable this and see if it fixes things |
Can confirm, downgrading to |
@cacoto if downgrading jupyter-server fixes it for you, then i'd guess we have the same root cause. If not, apologies for hijacking your issue! :) |
Having the same exact issue for a couple of days. Installed python via Miniforge.
|
The same issue, any workaround? # jupyter --version
Selected Jupyter core packages...
IPython : 8.7.0
ipykernel : 6.17.1
ipywidgets : 8.0.2
jupyter_client : 7.4.8
jupyter_core : 5.1.0
jupyter_server : 2.0.1
jupyterlab : 3.5.1
jupytext : 1.14.2
nbclient : 0.7.2
nbconvert : 7.2.6
nbformat : 5.7.0
notebook : 6.5.2
qtconsole : 5.3.1
traitlets : 5.6.0 The output: Traceback (most recent call last):
File "/home/amtf/.local/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
result = await result
File "/home/amtf/.local/lib/python3.10/site-packages/jupyter_server/services/contents/handlers.py", line 227, in post
await self._new_untitled(path, type=type, ext=ext)
File "/home/amtf/.local/lib/python3.10/site-packages/jupyter_server/services/contents/handlers.py", line 175, in _new_untitled
self.contents_manager.new_untitled(path=path, type=type, ext=ext)
File "/home/amtf/.local/lib/python3.10/site-packages/jupytext/contentsmanager.py", line 404, in new_untitled
config = self.get_config(path)
File "/home/amtf/.local/lib/python3.10/site-packages/jupytext/contentsmanager.py", line 572, in get_config
self.cached_config.config = self.load_config_file(
File "/home/amtf/.local/lib/python3.10/site-packages/jupytext/contentsmanager.py", line 541, in load_config_file
config_content = model["content"]
TypeError: 'coroutine' object is not subscriptable |
@amitbha I had to manually do all the things suggested here https://jupytext.readthedocs.io/en/latest/install.html
and I ran the following
Did it fix it? Yes. Am I confident in my Jupyter config that is super convoluted, not quite. |
Thanks. |
@amitbha @danielcs88 try downgrading |
Hi there, Sorry for jumping in. It looks like the three lines in Lines 40 to 42 in 393f231
Cheers. |
Thank you @kdm9 for diagnosing this! This is very helpful. I am able to reproduce the issue locally so I'll be working on making Jupytext compatible with async contents manager asap. For now the workarounds are to
in your Jupyter Notebook config file. Now the reason why the error is not spotted by the CI is that the contents manager used in tests is Lines 40 to 42 in 393f231
Finally let me explain why jupytext/jupytext/contentsmanager.py Lines 605 to 624 in 393f231
|
Well, I prefer to provide a contents manager that looks as close as possible to the original one, and that's the reason for that line (plus, there have been already three different default CM since we started this project, not even counting the new async one!). But sure we need to make sure this works for every base CM, I will add more tests to ensure that. |
As a quick fix I have released Then the plan is to make the Jupytext CM async - that should come in |
@mwouts brilliant, |
I followed the documentation and installed the jupytext into my environment.
When I tried to open the jupyter notebook, it gave me an error as following:
[C 17:38:32.393 NotebookApp] Bad config encountered during initialization: The 'contents_manager_class' trait of a NotebookApp instance expected a subclass of notebook.services.contents.manager.ContentsManager or jupyter_server.contents.services.managers.ContentsManage, not the JupytextContentsManager JupytextContentsManager.
The text was updated successfully, but these errors were encountered: