Skip to content

LeaderF doesn't work after updated it to the newest version on Windows10 + msys2 #267

@cjun714

Description

@cjun714
  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version: v 0.3.1
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim):
  • Output of :echo &pythonthreedll(only vim, not neovim):
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version): 3.7.1 (default, Oct 21 2018, 19:06:06) [GCC 8.2.0 64 bit (AMD64)]
  • Output of :echo g:Lf_Debug_Cmd:
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:
nnoremap <C-r> :LeaderfBufTag<CR>
nnoremap <leader>j :LeaderfTag<CR>

let g:Lf_StlSeparator = {'left':"",'right':""} " { 'left': "\ue0b0", 'right': "\ue0b2" }
let g:Lf_WindowHeight = 0.25
let g:Lf_RootMarkers = ['.project', '.root', '.svn', '.git']
let g:Lf_WorkingDirectoryMode = 'Ac'
let g:Lf_CacheDirectory = expand('/tmp/vim/cache')
let g:Lf_UseCache = 0
let g:Lf_ShowRelativePath = 0
let g:Lf_HideHelp = 1
let g:Lf_StlColorscheme = 'powerline'
let g:Lf_PreviewResult = {'Function':0, 'BufTag':0}

Describe your question, feature request, or bug.

LeaderF doesn't work after I updated it to the newest version.
My environment is Window10 + msys2 + mingw-w64-x86_64-python3

Steps to reproduce

:LeaderfFile

Actual behaviour

Console show error message:

Error detected while processing function leaderf#File#startExpl[2]..leaderf#LfPy:
line    1:
Request from non-main thread.
Requests from different threads should be wrapped with nvim.async_call(cb, ...) 
  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 917, in _bootstrap_inner
    self.run()

  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)

  File "D:\tool\dev\msys64\home\John\.vim\plugged\LeaderF\autoload/leaderf/python\leaderf\asyncExecutor.py", line 28, in _readerThread
    max_count = int(lfEval("g:Lf_MaxCount"))

  File "D:/tool/dev/msys64/mingw64/lib/python3.7/site-packages\pynvim\plugin\script_host.py", line 204, in eval
    obj = self.request("vim_eval", expr)

Request from non-main thread.
Requests from different threads should be wrapped with nvim.async_call(cb, ...) 
  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 917, in _bootstrap_inner
    self.run()

  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)

  File "D:\tool\dev\msys64\home\John\.vim\plugged\LeaderF\autoload/leaderf/python\leaderf\asyncExecutor.py", line 28, in _readerThread
    max_count = int(lfEval("g:Lf_MaxCount"))

  File "D:/tool/dev/msys64/mingw64/lib/python3.7/site-packages\pynvim\plugin\script_host.py", line 204, in eval
    obj = self.request("vim_eval", expr)

Exception in thread Thread-1:
Traceback (most recent call last):
  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "D:\tool\dev\msys64\home\John\.vim\plugged\LeaderF\autoload/leaderf/python\leaderf\asyncExecutor.py", line 28, in _readerThread
    max_count = int(lfEval("g:Lf_MaxCount"))
  File "D:/tool/dev/msys64/mingw64/lib/python3.7/site-packages\pynvim\plugin\script_host.py", line 204, in eval
    obj = self.request("vim_eval", expr)
  File "D:/tool/dev/msys64/mingw64/lib/python3.7/site-packages\pynvim\api\nvim.py", line 178, in request
    raise NvimError("request from non-main thread")
pynvim.api.nvim.NvimError: request from non-main thread
Exception in thread Thread-2:
Traceback (most recent call last):
  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 917, in _bootstrap_inner
    self.run()
  File "D:/tool/dev/msys64/mingw64/lib/python3.7\threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "D:\tool\dev\msys64\home\John\.vim\plugged\LeaderF\autoload/leaderf/python\leaderf\asyncExecutor.py", line 28, in _readerThread
    max_count = int(lfEval("g:Lf_MaxCount"))
  File "D:/tool/dev/msys64/mingw64/lib/python3.7/site-packages\pynvim\plugin\script_host.py", line 204, in eval
    obj = self.request("vim_eval", expr)
  File "D:/tool/dev/msys64/mingw64/lib/python3.7/site-packages\pynvim\api\nvim.py", line 178, in request
    raise NvimError("request from non-main thread")
pynvim.api.nvim.NvimError: request from non-main thread

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions