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

Getting error randomly when the current buffer is a .vim file #25

Closed
farzadmf opened this issue Mar 21, 2021 · 3 comments
Closed

Getting error randomly when the current buffer is a .vim file #25

farzadmf opened this issue Mar 21, 2021 · 3 comments
Labels

Comments

@farzadmf
Copy link

Describe the bug
I'm using vim-ctrlspace and I have an open buffer of a .vim file. When I want to list the tabs using vim-ctrlspace, I see the following error:

error caught in async handler '/home/farzad/.vim/plugged/vim-ultest/rplugin/python3/ultest:function:_ultest_update_positions [['init.vim']]'
Traceback (most recent call last):
  File "/home/farzad/.vim/plugged/vim-ultest/rplugin/python3/ultest/__init__.py", line 98, in _update_positions
    self.handler.update_positions(*args)
  File "/home/farzad/.vim/plugged/vim-ultest/rplugin/python3/ultest/handler/__init__.py", line 152, in update_positions
    vim_patterns = self._vim.sync_call("ultest#adapter#get_patterns", file_name)
  File "/home/farzad/.vim/plugged/vim-ultest/rplugin/python3/ultest/vim_client/__init__.py", line 128, in sync_call
    return self._eval(expr, sync=True)
  File "/home/farzad/.vim/plugged/vim-ultest/rplugin/python3/ultest/vim_client/__init__.py", line 141, in _eval
    return self._vim.eval(expr, async_=not sync)
  File "/usr/lib/python3.9/site-packages/pynvim/api/nvim.py", line 295, in eval
    return self.request('nvim_eval', string, **kwargs)
  File "/usr/lib/python3.9/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(return):E484: Can't open file init.vim

This is the log file:

22:53:12 | INFO | MainThread | logging.py:create_logger:71 | Logger created
22:53:12 | DEBUG | MainThread | __init__.py:__init__:40 | Handler created
22:53:14 | DEBUG | MainThread | __init__.py:update_positions:154 | No patterns found for init.vim

To Reproduce

  1. Open a .vim file
  2. Press ctrl + space to display vim-ctrlspace menu
  3. Press l to list tabs in vim-ctrlspace
  4. See the error

Expected behavior
There shouldn't be any errors!

@github-actions
Copy link

🎉 This issue has been resolved in version 2.5.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@rcarriga
Copy link
Owner

I've put in a quick catch all for this error which should work fine, but I'm curious as to why you get the error. I'm not familiar with vim-ctrlspace but it must be doing something with the buffer itself because the plugin will check that the file exists first... Also the error is actually being thrown in vim-test, just being caught in vim-ultest.

@farzadmf
Copy link
Author

Thank you @rcarriga for the super fast fix (as was the case with all my other issues). Keep up the good work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants