GithubHelp home page GithubHelp logo

KeyError: 18446744073709551615 about semshi HOT 7 CLOSED

numirias avatar numirias commented on July 29, 2024
KeyError: 18446744073709551615

from semshi.

Comments (7)

bfredl avatar bfredl commented on July 29, 2024 5

This is a bug in neovim. Errors in async_ requests wasn't sent back to clients in a meaningful way (18446744073709551615 is an internal sentinel value that shouldn't be exposed).

Next Nvim release 0.3.2 (+ accompanying pynvim release) will fix this.

from semshi.

numirias avatar numirias commented on July 29, 2024

Thanks for reporting! I suspect that in this specific case, you may see this bug because an error with Semshi itself is cause a high volume of RPC traffic, only coincidentally triggering that RPC bug. So I think this can be circumvented by finding out why you get the initial Semshi-related key errors (Key 'semshi#excluded_buffers' not found, etc.).

Do you mind sharing the neovim frontend, OS and maybe the config you're using?

from semshi.

darthdeus avatar darthdeus commented on July 29, 2024

I'm using neovim 0.3.0 from Homebrew on OS X 10.13.5 and here's my VIM config https://github.com/darthdeus/dotfiles/blob/master/vim/vimrc

from semshi.

darthdeus avatar darthdeus commented on July 29, 2024

@numirias Any tips for finding out the issue behind the initial key not found errors? I've tried looking around but wasn't able to figure out much.

from semshi.

numirias avatar numirias commented on July 29, 2024

@darthdeus I'm sorry, blaming the initial key errors was a red herring. They are fine (if they are just raised once at the beginning of a session when Semshi initializes the options). It's an innocuous side effect of this line in plugin.py:

val = vim.vars.get('semshi#' + key, val_default)

So we need to investigate why you get that KeyError: 18446744073709551615 RPC error anyway.

  • Does it still occur if you're using a minimal config?

  • This happens basically all the time when moving around in a file.

    Does that happen with any Python file of any size and immediately on startup or does it sometimes take a bit to occur?

  • Do you have the chance to test that config on another machine? If so, does the bug reproduce there?

  • Just to clarify again, are using vim in the terminal or a particular frontend (GUI)?

  • Finally, do you mind trying to go into handler.py, set batch_size inside _call_atomic_async() to a smaller value and see if the error disappears? (It's this line.)

from semshi.

darthdeus avatar darthdeus commented on July 29, 2024
  • Does it still occur if you're using a minimal config?

It seems to be related to deoplete.vim. I've tried for a bit with the following config:

set nocompatible
source ~/.dotfiles/third-party/vim-plug/plug.vim

call plug#begin("~/.dotfiles/test-plugs")

Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi'
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
Plug 'davidhalter/jedi-vim'

" let g:deoplete#enable_at_startup = 1

call plug#end()

If I uncomment let g:deoplete#enable_at_startup = 1 I get the error rather quickly. Sometimes even immediately. But when it is disabled the issue doesn't occur. At the same time it doesn't seem to occur when I don't include semshi.

  • Does that happen with any Python file of any size and immediately on startup or does it sometimes take a bit to occur?

It doesn't happen at startup, but it happens at various times. Sometimes I hit O and I get an error, and sometimes I can edit for say 30-60 seconds and nothing breaks.

It does happen to other files, but I wasn't yet able to reproduce it in small ones. I'll comment if I can. However it does happen even at the beginning of large files (when not scrolled down).

  • Do you have the chance to test that config on another machine? If so, does the bug reproduce there?

I didn't yet. I can test later if it's still needed.

  • Just to clarify again, are using vim in the terminal or a particular frontend (GUI)?

Yes, I am using Neovim in the terminal (inside tmux), no GUI.

  • Finally, do you mind trying to go into handler.py, set batch_size inside _call_atomic_async() to a smaller value and see if the error disappears? (It's this line.)

Updating to 20 caused this:

error caught in async handler '/Users/arnoljak/.dotfiles/test-plugs/semshi/rplugin/python3/semshi:autocmd:CursorMovedI:*.py []'
Traceback (most recent call last):
  File "/Users/arnoljak/.dotfiles/test-plugs/semshi/rplugin/python3/semshi/plugin.py", line 21, in wrapper
    func(self)
  File "/Users/arnoljak/.dotfiles/test-plugs/semshi/rplugin/python3/semshi/plugin.py", line 88, in event_cursor_moved_insert
    self._update_viewport()
  File "/Users/arnoljak/.dotfiles/test-plugs/semshi/rplugin/python3/semshi/plugin.py", line 180, in _update_viewport
    stop = self._vim.eval('line("w$")')
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/api/nvim.py", line 280, in eval
    return self.request('nvim_eval', string, **kwargs)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/api/nvim.py", line 170, in request
    res = self._session.request(name, *args, **kwargs)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/msgpack_rpc/session.py", line 91, in request
    v = self._yielding_request(method, args)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/msgpack_rpc/session.py", line 158, in _yielding_request
    self._async_session.request(method, args, response_cb)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/msgpack_rpc/async_session.py", line 45, in request
    self._msgpack_stream.send([0, request_id, method, args])
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/msgpack_rpc/msgpack_stream.py", line 35, in send
    self.loop.send(self._packer.pack(msg))
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/msgpack_rpc/event_loop/base.py", line 118, in send
    self._send(data)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/site-packages/neovim/msgpack_rpc/event_loop/asyncio.py", line 107, in _send
    self._transport.write(data)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/asyncio/unix_events.py", line 569, in write
    self._loop._add_writer(self._fileno, self._write_ready)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/asyncio/selector_events.py", line 307, in _add_writer
    (reader, handle))
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/selectors.py", line 261, in modify
    key = self.register(fileobj, events, data)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/selectors.py", line 536, in register
    key = super().register(fileobj, events, data)
  File "/Users/arnoljak/.pyenv/versions/3.6.5/lib/python3.6/selectors.py", line 241, in register
    .format(fileobj, key.fd))
KeyError: '1 (FD 1) is already registered'

but updating to 200 does seem to help. I haven't run into the error yet. I'll post in case I do.

from semshi.

darthdeus avatar darthdeus commented on July 29, 2024

A small update, just ran into the same error with batch_size set to 200, so I guess it only prolonged the error.

edit: Another thing I noticed, I tried disabling deoplete and using YouCompleteMe instead, but still ran into the issue :/ Not sure if this is helpful, if you need more info I'll gladly try out more things.

from semshi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.