benlubas/molten-nvim

[Help] Enter Output Cell

Closed this issue · 1 comments

I am running into troubles when attempting to enter an output cell with nvim complaining that the window does not exist.

Molten runs the cells just fine and I can see the output, but it will not allow me to hop into that output window. Would be grateful for any help.

My demo file:

print("Hello")

I run following commands in nvim

MoltenInit
MoltenEvaluateLine
MoltenEnterOutput

I see the output

Out[1]: Done 0.0s
Hello

But for the last step I receive the following error:

Error detected while processing function remote#define#request:                                                                                                                                                                                 
line    2:                                                                                                                                                                                                                                      
Error invoking '/Users/francis/.local/share/nvim/lazy/molten-nvim/rplugin/python3/molten:command:MoltenEnterOutput' on channel 3 (python3-rplugin-host):                                                                                        
error caught in request handler '/Users/francis/.local/share/nvim/lazy/molten-nvim/rplugin/python3/molten:command:MoltenEnterOutput []':                                                                                                        
Traceback (most recent call last):                                                                                                                                                                                                              
  File "/Users/francis/.local/share/nvim/lazy/molten-nvim/rplugin/python3/molten/utils.py", line 11, in inner                                                                                                                                   
    func(self, *args, **kwargs)                                                                                                                                                                                                                 
  File "/Users/francis/.local/share/nvim/lazy/molten-nvim/rplugin/python3/molten/__init__.py", line 463, in command_enter_output_window                                                                                                         
    kernel.enter_output()                                                                                                                                                                                                                       
  File "/Users/francis/.local/share/nvim/lazy/molten-nvim/rplugin/python3/molten/moltenbuffer.py", line 263, in enter_output                                                                                                                    
    self.should_show_floating_win = self.outputs[self.selected_cell].enter(                                                                                                                                                                     
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                     
  File "/Users/francis/.local/share/nvim/lazy/molten-nvim/rplugin/python3/molten/outputbuffer.py", line 112, in enter                                                                                                                           
    self.nvim.funcs.nvim_set_current_win(self.display_win)                                                                                                                                                                                      
  File "/Users/francis/anaconda3/lib/python3.11/site-packages/pynvim/api/nvim.py", line 323, in call                                                                                                                                            
    return self.request('nvim_call_function', name, args, **kwargs)                                                                                                                                                                             
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                             
  File "/Users/francis/anaconda3/lib/python3.11/site-packages/pynvim/api/nvim.py", line 199, in request                                                                                                                                         
    res = self._session.request(name, *args, **kwargs)                                                                                                                                                                                          
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                          
  File "/Users/francis/anaconda3/lib/python3.11/site-packages/pynvim/msgpack_rpc/session.py", line 139, in request                                                                                                                              
    raise self.error_wrapper(err)                                                                                                                                                                                                               
pynvim.api.common.NvimError: Vim:E5555: API call: Failed to switch to window 1009

System information:
MacOS 14.5

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478

Any help is appreciated, thanks!

Please read the documentation on that command in the readme