Yggdroot / LeaderF

An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Apache License 2.0
2.15k stars 179 forks source link

when i use leaderf and type in "fix" or "abc" or others, errors appear. #17

Closed linguanyuanA closed 8 years ago

linguanyuanA commented 8 years ago

fi Error detected while processing function leaderf#startFileExpl..leaderf#LfPy: line 2: Traceback (most recent call last): File "", line 1, in File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 450, in startExplorer self.input(False) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 463, in input self._search(self._content) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 198, in _search self._fuzzySearch(content) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 276, in _fuzzySearch pairs = self._filter(30000, filter_method, content) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 221, in _filter result.extend(filter_method(cb[:])) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 243, in return (p for p in pairs if p[0]) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 242, in for line in iterable) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/fuzzyMatch.py", line 308, in getWeight val) File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/fuzzyMatch.py", line 41, in evaluate i = ((x & -x) - 1).bit_length() AttributeError: 'int' object has no attribute 'bit_length'


vim --version | grep python

+cryptv +linebreak +python/dyn +viminfo +cscope +lispindent -python3 +vreplace i also tried to install python 3.4.3, but the errors still exist. my os is cenos 6.5. fix.txt is a file in my project.

Yggdroot commented 8 years ago

Since your vim compiled with '-python3', this plugin will use python2, however int.bit_length() was first introduced in python2.7, so I conclude that your python2 version is lower than 2.7. If you want to use python3, make sure your vim compiled with '+python3'.