Comments (7)
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.
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.
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.
@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.
@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
, setbatch_size
inside_call_atomic_async()
to a smaller value and see if the error disappears? (It's this line.)
from semshi.
- 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.
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)
- SemshiTextChanged Error when enter completion from compe-nvim in nvim 0.5? HOT 14
- AttributeError: 'NoneType' object has no attribute 'viewport' HOT 1
- How to use semshi in venv? HOT 2
- Semshi enable command not recognised HOT 2
- Highlights out of sync after reloading buffer
- Unresolved Global Yellow Underline When Importing * HOT 1
- Does this work with vim or just neovim? HOT 3
- Semshi produces errors with __future__ annotations HOT 11
- Way to disable syntax error highlighting in insert mode? HOT 2
- `and` and `or` how to highlight? HOT 1
- hi semshiLocal is ineffective at changing the highlight for local variables
- Error detected while processing function <SNR>52_filetype_changed HOT 1
- Any plans to python 3.10 new syntax support? HOT 3
- Is there a license for this project?
- Is there any chance of implementing new tree sitter functionality? HOT 3
- Semshi starts to highlight only after call :PlugInstall HOT 4
- Support for fenced codeblocks in markdown
- Is this repository still actively maintained? HOT 1
- error when using ipdb HOT 1
- Async request caused an error: Invalid buffer id Part 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semshi.