Comment 0 for bug 1268896

Revision history for this message
Vaibhav Sagar (vaibhavsagar) wrote :

Hi,

Ultisnips throws a UnicodeDecodeError for me when I try it with encoding=utf-8. I have tried this with the 'box' snippet in all.snippets and the 'def' snippet in python.snippets. For example:

box<Tab>

gives me the expanded snippet but also the error:

An error occured. This is either a bug in UltiSnips or a bug in a
snippet definition. If you think this is a bug, please report it to
https://bugs.launchpad.net/ultisnips/+filebug.

Following is the full stack trace:
Traceback (most recent call last):
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\__init__.py", line 65, in wrapper
    return f(self, *args, **kwds)
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\__init__.py", line 588, in expand
    if not self._try_expand():
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\__init__.py", line 979, in _try_expand
    self._do_snippet(snippet, before, after)
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\__init__.py", line 961, in _do_snippet
    self._jump()
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\__init__.py", line 824, in _jump
    _vim.select(self._ctab.start, self._ctab.end)
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\_vim.py", line 129, in select
    _unmap_select_mode_mapping()
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\_vim.py", line 218, in _unmap_select_mode_mapping
    all_maps = list(filter(len, eval(r"_tmp_smaps").splitlines()))
  File "C:\Users\Vaibhav\vimfiles\bundle\ultisnips\plugin\UltiSnips\_vim.py", line 107, in eval
    rv = vim.eval(as_vimencoding(s))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 660: invalid start byte

My python version is:
3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit (AMD64)]

Thanks!