joouha / euporie

Jupyter notebooks in the terminal
https://euporie.readthedocs.io
MIT License
1.54k stars 36 forks source link

Kernel died before replying to kernel_info #25

Closed chris-aeviator closed 2 years ago

chris-aeviator commented 2 years ago

Amazing Tool! I'm trying to run euporie, but my kernel dies as soon as I open a file (I created beforehand with eoporie).

Arch Python 3.10

 cat log
2022-06-02 23:33:11 DEBUG   [euporie.terminal.send:156] Sending query '\x1bPtmux;\x1b\x1b]11;?\x1b\x1b\\\x1b\\' for ForegroundColor
2022-06-02 23:33:11 DEBUG   [euporie.terminal.send:156] Sending query '\x1bPtmux;\x1b\x1b]10;?\x1b\x1b\\\x1b\\' for BackgroundColor
2022-06-02 23:33:11 DEBUG   [euporie.terminal.send:156] Sending query '\x1b[14t' for PixelDimensions
2022-06-02 23:33:11 DEBUG   [euporie.terminal.send:156] Sending query '\x1bPtmux;\x1b\x1b[c\x1b\\' for SixelGraphicsStatus
2022-06-02 23:33:11 DEBUG   [euporie.terminal.send:156] Sending query '\x1bPtmux;\x1b\x1b_Gi=4294967295,s=1,v=1,a=q,t=d,f=24;AAAA\x1b\x1b\\\x1b\\' for KittyGraphicsStatus
2022-06-02 23:33:11 DEBUG   [euporie.terminal._handle_response:139] Got terminal response for 'BackgroundColor'
2022-06-02 23:33:11 DEBUG   [euporie.terminal._handle_response:139] Got terminal response for 'ForegroundColor'
2022-06-02 23:33:11 INFO    [euporie.app.base.open_file:332] Opening file idea
2022-06-02 23:33:11 DEBUG   [euporie.tabs.notebook.__init__:80] Loading notebooks idea
2022-06-02 23:33:11 DEBUG   [euporie.kernel.start_:228] Starting kernel
2022-06-02 23:33:11 DEBUG   [euporie.kernel.start_:238] Started kernel
2022-06-02 23:33:11 DEBUG   [euporie.kernel.start_:243] Waiting for kernel to become ready
2022-06-02 23:33:12 ERROR   [euporie.kernel.start_:247] Error starting kernel
Traceback (most recent call last):
  File "/home/korny/.local/lib/python3.10/site-packages/euporie/kernel.py", line 245, in start_
    await self.kc.wait_for_ready(timeout=10)
  File "/home/korny/.local/lib/python3.10/site-packages/jupyter_client/client.py", line 201, in _async_wait_for_ready
    raise RuntimeError("Kernel died before replying to kernel_info")
RuntimeError: Kernel died before replying to kernel_info
2022-06-02 23:33:12 DEBUG   [euporie.kernel.stop_:224] Kernel None shutdown
2022-06-02 23:33:12 DEBUG   [euporie.tabs.notebook.check_kernel:415] Kernel status is 'error'
2022-06-02 23:33:15 DEBUG   [euporie.tabs.notebook.really_close:880] Closing notebook 'idea'
2022-06-02 23:33:15 DEBUG   [euporie.kernel.stop:895] Stopping kernel None (wait=False)
2022-06-02 23:33:15 DEBUG   [euporie.kernel.stop_:224] Kernel None shutdown
chris-aeviator commented 2 years ago

I reinstalled via a conda env and my error disappeared

joouha commented 2 years ago

Brilliant, I'm glad you got it working

wiraki commented 1 year ago

Hello, instead of opening a new issue I will post here.

I am running into the same (?) problem: RuntimeError('Kernel died before replying to kernel_info')

I installed via pipx as recommended, everything went smooth. I then tried to create a new notebook with euporie-notebook ./new-notebook.ipynb

This is what I see: image

Closing the error, I tried changing Kernel using the top menu. I was presented with 3 options:

It seems Bash is preselected, and when I switch to Python 3 I get another Error popup: ZMQError: operation not supported

I have previously tried to install SoS and that is a very long time ago and I don't remember where or how. It could be that back then I messed something up with kernels.

I also tried to first create a new conda env, then install euporie in that environment with pip, but I have the exact same problem.

python version: 3.10.6 euporie version: 2.3.0

I'd be super-grateful if you could help me get this up and running.

joouha commented 1 year ago

Hi @mpauper

This looks like your ipykernel install is probably a bit broken. Try:

  1. Re-installing or updating ipykernel:
    pip install --upgrade ipykernel
  2. Re-registering the ipython kernel:
    python -m ipykernel install --user