vint: Syntastic: `unrecognized error format (crashed checker?)`?
I’m getting an error when I run :SyntasticCheck
on VimL files. I have vim configured with only the options suggested for new users in Syntastic’s README:
let g:syntastic_vim_checkers = ['vint']
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
Here’s the output for the Syntastic debug log:
syntastic: warning: checker vim/vint: unrecognized error format (crashed checker?)
syntastic: 255.519186: g:syntastic_version = '3.8.0-3 (Vim 800, Darwin, GUI)'
syntastic: 255.519360: &shell = '/bin/bash', &shellcmdflag = '-c',
&shellpipe = '2>&1 | tee',
&shellquote = '',
&shellredir = '>%s 2>&1',
&shelltemp = 1,
&shellxquote = '',
&autochdir = 0,
&shellxescape = ''
syntastic: 255.519927: UpdateErrors: vint
syntastic: 255.520186: CacheErrors: vint
syntastic: 255.520800: g:syntastic_aggregate_errors = 0
syntastic: 255.520984: getcwd() = '/Users/rlue'
syntastic: 255.521474: CacheErrors: Invoking checker: vim/vint
syntastic: 255.522067: SyntasticMake: called with options:
{'preprocess': 'vint',
'errorformat': '%f:%l:%c:%t: %m',
'makeprg': 'vint /Users/rlue/.vim/config/mappings.vim --json',
'returns': [0, 1]}
syntastic: 255.847839: system: command run in 0.325377s
syntastic: 255.848224: checker output:
['Traceback (most recent call last):',
' File "/usr/local/bin/vint", line 11, in <module>',
' sys.exit(main())',
' File "/usr/local/lib/python2.7/site-packages/vint/__init__.py", line 11, in main',
' init_cli()',
' File "/usr/local/lib/python2.7/site-packages/vint/bootstrap.py", line 22, in init_cli',
' cli.start()',
' File "/usr/local/lib/python2.7/site-packages/vint/linting/cli.py", line 26, in start',
' config_dict = self._build_config_dict(env)',
' File "/usr/local/lib/python2.7/site-packages/vint/linting/cli.py", line 56, in _build_config_dict',
' ConfigDefaultSource(env),',
' File "/usr/local/lib/python2.7/site-packages/vint/linting/config/config_file_source.py", line 12, in __init__',
' with config_file_path.open() as file_obj:',
' File "/usr/local/lib/python2.7/site-packages/pathlib.py", line 1077, in open',
' return io.open(str(self), mode, buffering, encoding, errors, newline)',
'LookupError: unknown encoding: ', '']
syntastic: warning: checker vim/vint: unrecognized error format (crashed checker?)
syntastic: 255.849312: preprocess: []
syntastic: 255.849533: raw loclist: []
syntastic: 255.849727: getLocList: checker vim/vint returned 1
syntastic: 255.849863: vim/vint raw: []
syntastic: 255.850016: quiet_messages filter: {}
syntastic: 255.850130: getLocList: checker vim/vint run in 0.328544s
syntastic: 255.850399: aggregated: {'_sorted': 0, '_name': '', '_owner': 2, '_columns': 1, '_rawLoclist': []}
It appears this problem has cropped up with other linters, as well. Maybe a null value is being passed as an argument to io.open
?
File "/usr/local/lib/python2.7/site-packages/pathlib.py", line 1077, in open
return io.open(str(self), mode, buffering, encoding, errors, newline)
LookupError: unknown encoding:
I’d dig through the traceback in more detail, but I don’t know python at all. :\
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 18 (7 by maintainers)
So @lcd407 totally figured it out. The problem is that Finder doesn’t preserve locales. If I set
let g:syntastic_vim_vint_exe = 'LC_CTYPE=UTF-8 vint'
, then everything works fineI’m reopening this issue per his/her suggestion:
Thank you @kuniwak!
EDIT: @lcd047 figured it out! It’s the
LC_CTYPE
environment variable. Still don’t know what to do about it, though.So I’ve been investigating this problem a little further. @lcd047 (from Syntastic) suggested it might be wise to look at the output of
:echo system('env')
. I thought I’d share just in case you found it useful.I ran the command in both settings (invoking from terminal and invoking from Finder), then removed all the identical lines. Here’s what was left:
Launched from the terminal, it looks like this:
and launched from the Finder, it looks like this:
/usr/local/lib/python2.7/site-packages/vint/asset/default_config.yaml: text/plain; charset=us-ascii
UTF-8