Closed aj8k closed 10 years ago
Please open a Python file, set g:syntastic_debug
to 3, run the checker, and post the output of :mes
.
Sorry for delay. Here is output:
Messages maintainer: Bram Moolenaar <Bram@vim.org>
"one.py" 5L, 45C
syntastic: 1.932635: g:syntastic_version = '3.4.0-92'
syntastic: 1.932896: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shellslash = 0, &shelltemp = 1, &shellxquo
te = '', &shellxescape = ''
syntastic: 1.933359: g:syntastic_aggregate_errors = 0
syntastic: 1.933619: getcwd() = /Users/ajoy/Work
syntastic: 2.160336: CacheErrors: Invoking checker: python/pylint
syntastic: 2.162264: SyntasticMake: called with options: {'errorformat': '%A%f:%l:%c:%t: %m,%A%f:%l: %m,%A%f:(%l): %m,%-Z%p^%.%#,%-G%.%#', 'makeprg': 'TERM=dumb pylint -f text --
msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n one.py', 'returns': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
, 26, 27, 28, 29, 30, 31]}
syntastic: 2.391039: checker output: ['No config file found, using default configuration', '************* Module one', 'Traceback (most recent call last):', ' File "/usr/local/b
in/pylint", line 9, in <module>', ' load_entry_point(''pylint==1.2.1'', ''console_scripts'', ''pylint'')()', ' File "/usr/local/lib/python2.7/site-packages/pylint/__init__.py
", line 21, in run_pylint', ' Run(sys.argv[1:])', ' File "/usr/local/lib/python2.7/site-packages/pylint/lint.py", line 1051, in __init__', ' linter.check(args)', ' File "
/usr/local/lib/python2.7/site-packages/pylint/lint.py", line 626, in check', ' self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)', ' File "/usr/local/lib
/python2.7/site-packages/pylint/lint.py", line 712, in check_astroid_module', ' walker.walk(astroid)', ' File "/usr/local/lib/python2.7/site-packages/pylint/utils.py", line 7
12, in walk', ' cb(astroid)', ' File "/usr/local/lib/python2.7/site-packages/pylint/checkers/base.py", line 1047, in visit_module', ' self._check_docstring(''module'', nod
e)', ' File "/usr/local/lib/python2.7/site-packages/pylint/checkers/base.py", line 1085, in _check_docstring', ' self.add_message(''missing-docstring'', node=node, args=(node
_type,))', ' File "/usr/local/lib/python2.7/site-packages/pylint/checkers/__init__.py", line 97, in add_message', ' self.linter.add_message(msg_id, line, node, args)', ' Fil
e "/usr/local/lib/python2.7/site-packages/pylint/utils.py", line 461, in add_message', ' self.reporter.add_message(msgid, (path, module, obj, line or 1, col_offset or 0), msg)
', ' File "/usr/local/lib/python2.7/site-packages/pylint/reporters/text.py", line 60, in add_message', ' self.write_message(m)', ' File "/usr/local/lib/python2.7/site-packag
es/pylint/reporters/text.py", line 49, in write_message', ' self.writeln(msg.format(self._template))', ' File "/usr/local/lib/python2.7/site-packages/pylint/reporters/__init_
_.py", line 112, in writeln', ' print >> self.out, self.encode(string)', ' File "/usr/local/lib/python2.7/site-packages/pylint/reporters/__init__.py", line 102, in encode', '
locale.getdefaultlocale()[1] or', ' File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale', '
return _parse_localename(localename)', ' File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localena
me', ' raise ValueError, ''unknown locale: %s'' % localename', 'ValueError: unknown locale: UTF-8', '']
syntastic: 2.395190: raw loclist: []
syntastic: 2.395513: getLocList: checker python/pylint returned 1
syntastic: 2.395694: python/pylint raw: []
syntastic: 2.395936: quiet_messages filter: {}
syntastic: 2.396361: aggregated: {'_name': '', '_rawLoclist': [], '_owner': 1}
' File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename', ' raise ValueError, ''unknown locale: %s'' % localename', 'ValueError: unknown locale: UTF-8'
Your pylint crashes.
Thanx for helping in diagnostic. Find solution by simple googling. Can be found by next link: http://patrick.arminio.info/blog/2012/02/fix-valueerror-unknown-locale-utf8/
To cut a long story short I just added next lines to ~/.bash_profile
and that helps ('en_US.UTF-8' is my locale):
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_ALL=
Hi! Syntax checking does not work for me at all. Vim 7.4, pylint 1.2.1 Turned on in vimrc
let g:syntastic_python_checkers = ['pylint']
Output of:SyntasticInfo
But no errors appeared after saving file or manual check run. Here is output of direct pylint check: