ahreenah / cuda_snippet_panel

CudaText plugin: Snippet Panel
0 stars 1 forks source link

crash UTF16 #12

Closed Alexey-T closed 5 years ago

Alexey-T commented 5 years ago
all files: ['List.txt']
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/home/user/.config/cudatext/py/cuda_snippet_panel/__init__.py", line 86, in __init__
    h=self.create_menu()
  File "/home/user/.config/cudatext/py/cuda_snippet_panel/__init__.py", line 136, in create_menu
    self.set_items(h,outlist,self.get_symbols_of_type(headers[0]))
  File "/home/user/.config/cudatext/py/cuda_snippet_panel/__init__.py", line 49, in get_symbols_of_type
    for j in f.readlines():
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
  File "/usr/lib/python3.6/encodings/utf_16.py", line 67, in _buffer_decode
    raise UnicodeError("UTF-16 stream does not start with BOM")
UnicodeError: UTF-16 stream does not start with BOM