Skip to content
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

Changes in a last cell crashing the jupynium server and FF tab #125

Open
apetrov opened this issue Jun 18, 2024 · 2 comments
Open

Changes in a last cell crashing the jupynium server and FF tab #125

apetrov opened this issue Jun 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@apetrov
Copy link

apetrov commented Jun 18, 2024

Describe the bug
There is an assertion in the jupynium server and FF tab crashes when changing the last cell of the ju.py file.

To Reproduce

  1. Create a notebook
  2. Add a several cells
  3. Change the last cell a several time
  4. See error in jupynium

Expected behavior
It should not fail.

Logs in /tmp/jupynium/logs/
The tmp directory path can be different in a different OS.
Alternatively, run :JupyniumStartAndAttachToServerInTerminal to see the output directly in neovim.

jupynium.cmds.jupynium: 585 - ERROR - Uncaught exception occurred while processing events. Detaching nvim.
Traceback (most recent call last):
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/buffer.py", line 192, in _on_lines_update_buf
cell_idx, _, row_within_cell = self.get_cell_index_from_row(start_row)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/buffer.py", line 365, in get_cell_index_from_row
raise IndexError(f"Could not find cell for row {row}")
IndexError: Could not find cell for row 47

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/cmds/jupynium.py", line 580, in main
status, rpcrequest_event = process_events(nvim_info, driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/events_control.py", line 225, in process_events
status = process_notification_event(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/events_control.py", line 656, in process_notification_event
prev_lazy_args_per_buf.lazy_on_lines_event(
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/events_control.py", line 158, in lazy_on_lines_event
self.data[bufnr].on_lines_args = lazy_on_lines_event(
^^^^^^^^^^^^^^^^^^^^
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/events_control.py", line 618, in lazy_on_lines_event
process_on_lines_event(nvim_info, driver, bufnr, previous_on_lines)
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/events_control.py", line 627, in process_on_lines_event
nvim_info.jupbufs[bufnr].process_on_lines(
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/buffer.py", line 168, in process_on_lines
) = self._on_lines_update_buf(lines, start_row, old_end_row, new_end_row)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/apetrov/projects/vimfiles/.env/lib/python3.11/site-packages/jupynium/buffer.py", line 200, in _on_lines_update_buf
assert start_row == old_end_row == self.num_rows
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Output of jupynium --version

Jupynium v0.2.4

Output of nvim --version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Run "nvim -V1 -v" for more info```

**Additional context**
None
@apetrov apetrov added the bug Something isn't working label Jun 18, 2024
@kiyoon
Copy link
Owner

kiyoon commented Jun 18, 2024

I can't reproduce this. What system are you on? Does this happen consistently?

Apprently, Jupynium couldn't get updates of neovim buffer correctly but I have no idea why.

@apetrov
Copy link
Author

apetrov commented Jun 18, 2024

thanks!

macos 14.4.1
firefox 126.0.1 (64-bit)

will try to collect more information when it crashes next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants