maralla / completor.vim

Async completion framework made ease.
MIT License
1.29k stars 63 forks source link

Cannot use a bytes pattern error on '(s' #185

Closed mark64 closed 6 years ago

mark64 commented 6 years ago

When editing a C file in neovim, the following string causes the error message posted below (s

I have removed all plugins except completer.vim, and was able to reproduce the error. No other character besides 's' seems to cause problems.

This issue first occured with commit ed06e70ba0134d9265bf9ca560d166dbab6d1fce and still occurs in the current HEAD ca0dd9923f9dfb3f66a398d0c2224d4ca3b989de.

Error detected while processing function <SNR>174_nvim_oneshot_handler[4]..completor#action#callback[2]..<SNR>172_trigger_complete[4]..completor#utils#on_data[1]..provider#python3#Call: line 18: Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/mark/.config/nvim/bundle/completor.vim/pythonx/completor/api.py", line 14, in wrapper return func(vim.bindeval('a:')) File "/home/mark/.config/nvim/bundle/completor.vim/pythonx/completor/api.py", line 35, in on_data return c.on_data(args['action'], args['msg']) if c else [] File "/home/mark/.config/nvim/bundle/completor.vim/pythonx/completor/__init__.py", line 225, in on_data return self.do_complete(data) File "/home/mark/.config/nvim/bundle/completor.vim/pythonx/completor/__init__.py", line 205, in do_complete ret.extend(self.on_complete(data)) File "/home/mark/.config/nvim/bundle/completor.vim/pythonx/completers/cpp/__init__.py", line 230, in on_complete data['word'] = strip_optional(data['menu']) File "/home/mark/.config/nvim/bundle/completor.vim/pythonx/completers/cpp/__init__.py", line 49, in strip_optional return re.sub(b'{#.*#}|\[#.*#\]', b'', menu) File "/usr/lib/python3.5/re.py", line 182, in sub return _compile(pattern, flags).sub(repl, string, count) Press ENTER or type command to continue Error detected while processing function <SNR>174_nvim_oneshot_handler[4]..completor#action#callback[2]..<SNR>172_trigger_complete[4]..completor#utils#on_data[1]..provider#python3#Call: line 18: TypeError: cannot use a bytes pattern on a string-like object Press ENTER or type command to continue

maralla commented 6 years ago

The problem should be fixed in the latest commits.

mark64 commented 6 years ago

Confirmed