-
Notifications
You must be signed in to change notification settings - Fork 119
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
Controlling neovim from jupyter notebook: "another loop is running" #533
Comments
GH doesn't support uploading ipynb files, so here's the raw text of a minimal Jupyter notebook to reproduce the issue: Expand me for the notebook
|
Don't have an answer to this unfortunately. Known issue: #489 Possible workaround: #326 (comment) |
Thanks for the swift reply |
A workaround is to use nest_asyncio. It is not a perfect solution as the behavior of nested asyncio loop can be quite unintuitive and strange, but works at least minimally:
|
I've got a jupyter notebook, from which I want to control an instance of neovim. Following the instructions in the pynvim repo, I can setup neovim to listen like so:
and then I can control that instance of neovim from a regular (non-notebook) python session like so:
The above all works fine from a regular python session (
python3
oripython
) but it doesn't work from a jupyter notebook. Trying to run the following cell:Results in the following error:
Which looks like both jupyter and pynvim are trying to run async loops at the same time. I'm not sure how to get around the issue though.
How can I control neovim from a python jupyter notebook?
I'm running on a Mac, Python 3.11.3, IPython version 8.4.0, ipykernel version 6.15.1, pynvim version 0.4.3
The text was updated successfully, but these errors were encountered: