Comments (22)
Odd, I'm using the exact same setup and don't experience the bug.
- Can you reproduce it with a stripped-down
init.vim
and without any other plugins? (Or mind sharing yourinit.vim
?) - Did you run
:UpdateRemotePlugins
?
from semshi.
Thank, I updated everything and can now use Semshi again.
But once in a while I got a screenful of error messages but I haven't got time to check whether it's about the race conditions or something else.
from semshi.
Sure! Do you mind leaving this open to keep the paper trail until there is more information on the issue?
from semshi.
Hm, I haven't seen this error in a while on neither of my two machines, even before the mentioned pull request. I'll update python-neovim and I'll keep an eye on it.
from semshi.
I am experiencing exactly this issue again right now. Has anything changed that this happens again?
from semshi.
Thanks for reporting! This seems to be caused by a similar initialization bug as #10.
Do you mind sharing which OS and neovim frontend you are using?
from semshi.
I'm using ArchLinux and plain neovim without any frontends.
from semshi.
It boiled down to this. I can't minimize it any further. If I remove LanguageClient or far, the error goes away:
set rtp+=~/.fzf
if &compatible
set nocompatible
endif
call plug#begin('~/.vim/plugged')
Plug 'numirias/semshi'
Plug 'autozimu/LanguageClient-neovim'
Plug 'brooth/far.vim'
call plug#end()
Did you run :UpdateRemotePlugins
Sure. I ran this command when I was bisecting my vimrc as well. (reduce vimrc, start neovim to update remote plugins, start neovim again to check).
from semshi.
I couldn't reproduce the bug with your config. There seems to be some race condition during initialization.
However, I modified initialization (83f56bf) so that Semshi doesn't assume a particular event order anymore. Does that solve the problem for you?
from semshi.
Thank you! It helped!
On a side note (and sorry for putting all requests into the same issue), would it possible to have:
- an option to start vim with semshi disabled by default (I'd like to turn it on occasionally when I read specific pieces of code).
- have
toggle
command. I know it's easy to implement it yourself, but it's convenient to have it out of the box.
from semshi.
Thanks for your help resolving this bug!
- You can set
let g:semshi#excluded_buffers = ['*']
to initially disable Semshi on all buffers. - I implemented
:Semshi toggle
.
Does that enable the workflow you had in mind?
from semshi.
Thank you! It's very helpful and convenient now!
Looks like I was a bit hasty and for some reason I'm still seeing the first message at startup after your recent update:
Error detected while processing function remote#define#request:
line 2:
no request handler registered for "/home/bz/rc.arch/bz/.vim/plugged/semshi/rplugin/python3/semshi:autocmd:BufEnter:*.py"
Though I don't see the second message anymore (well, at least some good news). However, even though this message is printed, the plugin seems to be working fine (I'm still testing using the minimal configuration above plus the options that you've mentioned). Is there any other information I can provide to help you find the reason of that first message?
EDIT: okay, I've just realized that I wrote previous message from my working machine and now I'm testing at home machine.
EDIT2: looks like there are more race conditions and not necessarily in this plugin. Sometimes I notice that the error is gone with my full vimrc, other times I see this:
Error detected while processing function <SNR>82_on_bufenter[13]..gitgutter#process_buffer[8]..gitgutter#diff#run_diff:
line 2:
no notification handler registered for "/home/bz/rc.arch/bz/.vim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient:autocmd:BufReadPost:*"
Error detected while processing function <SNR>82_on_bufenter:
line 13:
E171: Missing :endif
Side note: is it expected that only other instances are highlighted, not the one under the cursor?
from semshi.
I'm sorry you're still having issues.
Does the no request handler registered
message appear all the time (on that machine)? Is there a configuration where it does not appear?
It's odd because the message indicates that the BufEnter
event handler isn't registered which is just done through a Python decorator, no fancy application logic. E.g., I could provoke the error by going into semshi/plugin.py
and commenting out the @neovim.autocmd('BufEnter' ...)
decorator (without running :UpdateRemotePlugins
again).
So it appears like neovim doesn't register the plugin's handlers in time to handle the event. Given that you also got
no notification handler registered for "/home/bz/rc.arch/bz/.vim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient:autocmd:BufReadPost:*"
which is related to a different Python 3 plugin, could this be a bug in the neovim Python client? (Or do you only get any of those errors when you use it in conjunction with Semshi?)
Side note: is it expected that only other instances are highlighted, not the one under the cursor?
I thought about that one. :) You can set the option g:semshi#mark_selected_nodes = 2
to mark the node under the cursor too.
from semshi.
I'm sorry you're still having issues.
No worries! I appreciate very much your desire to help and the effort you put into sorting things out!
Does the no request handler registered message appear all the time (on that machine)? Is there a configuration where it does not appear?
Hmm, it looks like yes, all the time when Semshi is on. I think it didn't appear either when I forgot to run :UpdateRemovePlugins
since one of the previous config changes, or when I removed one of those plugins that require that command to work (see below).
Or do you only get any of those errors when you use it in conjunction with Semshi?
That is correct. Only after installing Semshi I started to see these messages. Never seen 'em before.
could this be a bug in the neovim Python client?
Is there anything I can do to validate this hypothesis? Maybe it surfaces itself only after a certain number of plugins that rely on UpdateRemotePlugins command?
Anyway, here is my list of such plugins (I think), maybe you could try different combinations of them and see whether the error shows up:
set rtp+=~/.fzf
if &compatible
set nocompatible
endif
call plug#begin('~/.vim/plugged')
Plug 'numirias/semshi'
Plug 'autozimu/LanguageClient-neovim'
Plug 'brooth/far.vim'
Plug 'raghur/vim-ghost', {'do': ':GhostInstall'}
Plug 'arakashic/chromatica.nvim'
Plug 'Shougo/deoplete.nvim'
call plug#end()
"let mapleader=","
"let g:semshi#excluded_buffers = ['*']
"nnoremap <Leader>z :Semshi toggle<cr>
let g:semshi#mark_selected_nodes = 2
And also here is my complete vimrc: https://gist.github.com/balta2ar/71abb871416bb771b6259223c464e67b
Sorry, it's a huge mess, but if it helps you reproduce the problem, it would be a great start.
BTW, since the original message neovim has been released, so I'm on 0.3.0 version now.
from semshi.
Great, I can now repro with your minimal config and exactly these three plugins:
call plug#begin('~/.vim/plugged')
Plug 'numirias/semshi'
Plug 'autozimu/LanguageClient-neovim'
Plug 'brooth/far.vim'
call plug#end()
All three share in common that they are Python 3 plugins and I observed that removing any single one of them stops the error.
I also created a dummy plugin (~/dummy/rplugin/python3/dummy/__init__.py
):
import neovim
@neovim.plugin
class Plugin:
def __init__(self, vim):
self._vim = vim
@neovim.autocmd('BufEnter', pattern='*', sync=True)
def foo(self):
self._vim.out_write('hey\n')
(You'd load this via e.g. Plug '~/dummy'
.)
Enabling that plugin instead of Semshi shows the exact same behavior (again, unless you disable one of the others):
no request handler registered for "/home/me/dummy/rplugin/python3/dummy:autocmd:BufEnter:*"
To me this indeed hints at a problem on Neovim's side.
from semshi.
@balta2ar Unless you think this can be fixed in Semshi, I'd go ahead and file a bug at neovim/python-client.
from semshi.
Just want to share that I have the same issue:
Error detected while processing function remote#define#notify
E475: Invalid argument: Chanel doesn't exist
I use the same neovim, tmux, zsh config for my local Mac and Linux remote machines, I only have this issue running on my MacOS Mojave.
The softwares on my Mac are always the latest though, while the Linux machines are not as updated.
from semshi.
@lkhphuc Thanks for noting. Are you using Neovim in the terminal, or a particular frontend? Do you get the error consistently or just sometimes?
I still think this may be caused by a race condition in the Neovim Python client. If you like to help get it resolved, you might want to add you thoughts to neovim/pynvim#341. In particular, it would be interesting to see if you can reproduce the error with the methods I described there (which would also show that the bug can be triggered without Semshi).
from semshi.
Sorry for late reply.
Are you using Neovim in the terminal, or a particular frontend? Do you get the error consistently or just sometimes?
I use Neovim on Therm terminal (a minimal fork of iTerm 2), and it happens every time I start typing in a python file and it will not stop until I quit neovim.
I will check out the issue you mentioned. I really like semshi and it's very annoying that I can't use it locally. Hope to get this issue resolved soon.
from semshi.
In particular, it would be interesting to see if you can reproduce the error with the methods I described there (which would also show that the bug can be triggered without Semshi).
@numirias neovim/pynvim#341 (comment) I can reproduce the problem over there.
But my situation is way worse, once the error pops up, it will pop up again every time I type anything, so basically make it not usable for me, while the error from the error from @balta2ar only show up once at startup.
from semshi.
@balta2ar @lkhphuc Does the error still reproduce with latest Semshi and latest Neovim Python client? ($ pip show neovim
should give v0.3.0)
With #26, API calls from threads are now scheduled correctly on the main thread, and I'm hoping that may resolve this issue as well.
from semshi.
#17 (comment) mentioned "Next Nvim release 0.3.2 (+ accompanying pynvim release) will fix this."
I tried re-install semshi package but failed.
Re-install neovim worked: sudo apt install neovim
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.