Closed mezianem closed 4 years ago
The TL;DR version: pylint
exits with code 139, which is something it isn't supposed to do. How or why it does that isn't clear, since exit code is not mentioned in your logs.
To provide more useful logs please quit Vim, turn off syntastic_check_on_open
in your vimrc
, open your test file, set syntastic_debug
to 33, run :SyntasticInfo pylint
, and post the logs. Then, again, quit Vim, open your test file, set syntastic_debug
to 3, run :SyntasticCheck pylint
, and post the logs.
On a side note: you might consider using ALE instead of syntastic. It takes advantage of Vim 8 features, and is actively maintained.
Hello ! Thanks for your answer. Here's the output of :
SyntasticInfo _(syntasticdebug = 33) : Syntastic version: 3.10.0-7 (Vim 801, Linux) Info for filetype: python Global mode: active Filetype python is active The current file will be checked automatically syntastic: 90.712630: system: command run in 0.641232s syntastic: 90.712940: python/pylint: pylint version = [2, 3, 1] Available checkers: flake8 pep8 pycodestyle pyflakes pylint python Currently enabled checkers: python flake8 pep8 syntastic: 90.717959: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shelltemp = 1, &shellxquote = '', &autochdir = 0, &shellxescape = ''
SyntasticInfo pylint : Syntastic version: 3.10.0-7 (Vim 801, Linux) Info for filetype: pylint Global mode: active Filetype pylint is active Available checkers: - Currently enabled checkers: - syntastic: 101.391357: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shelltemp = 1, &shellxquote = '', &autochdir = 0, &shellxescape = '' syntastic: 142.782715: g:syntasticversion = '3.10.0-7 (Vim 801, Linux)' syntastic: 142.783057: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shelltemp = 1, &shellxquote = '', &autochdir = 0, &shellxescape = '' SyntasticCheck pylint (syntasticdebug=3) syntastic: 142.787827: UpdateErrors: pylint syntastic: 142.792134: CacheErrors: pylint syntastic: 142.797762: g:syntastic_aggregate_errors = 0 syntastic: 142.801962: getcwd() = '/home/mezianem/scripts/from_colleagues/local/nfrebourg' syntastic: 142.805955: CacheErrors: Invoking checker: python/pylint syntastic: 142.810881: SyntasticMake: called with options: {'errorformat': '%A%f:%l:%c:%t: %m,%A%f:%l: %m,%A%f:(%l): %m,%-Z%p^%.%#,%-G%.%#', 'makeprg': 'pylint -f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n car tstationplot.py', 'env': {'TERM': 'dumb'}, '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: 143.971254: system: command run in 1.154859s syntastic: 143.971504: checker output: [''] syntastic: error: checker python/pylint returned abnormal status 139 syntastic: 143.975956: python/pylint raw: [] syntastic: 143.979854: quiet_messages filter: {} syntastic: 143.983762: getLocList: checker python/pylint run in 1.173196s syntastic: 143.987676: aggregated: {'_sorted': 0, '_name': '', '_owner': 1, '_columns': 1, '_rawLoclist': []}
Thanks again for the help ! (and for the advice in side note : I will check that !)
Right, it looks like this has nothing to do with syntastic and is all between your Vim and your Pylint. So either Pylint actually returns 139 (perhaps because of some unrelated Python modules you have installed), or, since 139 = 128 + 11
, your Vim doesn't read Pylint's exit code correctly (upgrading Vim might help in that case).
You can tell syntastic to ignore exit codes from linters, if you set g:syntastic_exit_checks
to 1 you should be able to use syntastic normally. If I recall correctly this just skips some sanity checks and doesn't incur any functionality loss. The exit code 139 is abnormal, and it might still be a good idea to get to the root of it and find out what's going on. But I can't help you debugging this any further, sorry. Not sure what else I could tell you.
Ok I see .. I think I will keep things simple and use another checker :). This is happening on a professional machine, I don't have so much rights on it so my hands are a kind a bit tied up to dive further into this problem. If I get any clues about what could possibly go on, I'll inform you guys. Thanks again for the answers and your reactivity !
Hello,
I am a new user of syntastic and I encountered the error written in the title when trying to edit a colleague's script : When I run :SyntasticCheck pylint, it switches to an error buffer and gives the error python/pylint returned abnormal status 139. I tried to see what is happening by setting g:syntastic_debug=51 and run :SyntasticCheck with pylint, and it gives me the following output :
syntastic: 262.023308: g:syntastic_version = '3.10.0-7 (Vim 801, Linux, GUI)' syntastic: 262.023720: &shell = '/bin/bash', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shelltemp = 1, &shellxquote = '', &autochdir = 0, &shellxescape = '' syntastic: 262.030908: g:syntastic_aggregate_errors = 0 syntastic: 262.030908: g:syntastic_always_populate_loc_list = 1 syntastic: 262.030908: g:syntastic_auto_jump = 0 syntastic: 262.030908: g:syntastic_auto_loc_list = 1 syntastic: 262.030908: g:syntastic_check_on_open = 1 syntastic: 262.030908: g:syntastic_check_on_wq = 1 syntastic: 262.030908: g:syntastic_cursor_columns = 1, b:syntastic_cursor_columns = 1 syntastic: 262.030908: g:syntastic_debug = 51 syntastic: 262.030908: g:syntastic_echo_current_error = 1 syntastic: 262.030908: g:syntastic_enable_balloons = 1 syntastic: 262.030908: g:syntastic_enable_highlighting = 1 syntastic: 262.030908: g:syntastic_enable_signs = 1 syntastic: 262.030908: g:syntastic_error_symbol = '>>' syntastic: 262.030908: g:syntastic_exit_checks = 1 syntastic: 262.030908: g:syntastic_filetype_map = {} syntastic: 262.030908: g:syntastic_full_redraws = 0 syntastic: 262.030908: g:syntastic_id_checkers = 1 syntastic: 262.030908: g:syntastic_ignore_extensions = '\c\v^([gx]?z|lzma|bz2)$' syntastic: 262.030908: g:syntastic_ignore_files = [] syntastic: 262.030908: g:syntastic_loc_list_height = 10 syntastic: 262.030908: g:syntastic_nested_autocommands = 0 syntastic: 262.030908: g:syntastic_quiet_messages = {} syntastic: 262.030908: g:syntastic_reuse_loc_lists = 1 syntastic: 262.030908: g:syntastic_shell = '/bin/bash' syntastic: 262.030908: g:syntastic_sort_aggregated_errors = 1 syntastic: 262.030908: g:syntastic_stl_format = '[Syntax: line:%F (%t)]' syntastic: 262.030908: g:syntastic_style_error_symbol = 'S>' syntastic: 262.030908: g:syntastic_style_warning_symbol = 'S>' syntastic: 262.030908: g:syntastic_warning_symbol = '>>' syntastic: 262.148315: UpdateErrors: pylint syntastic: 262.153888: CacheErrors: pylint syntastic: 262.160063: g:syntastic_aggregate_errors = 0 syntastic: 262.164747: $TERM = 'xterm-256color' syntastic: 262.169230: $TMPDIR = '/tmp' syntastic: 262.174143: $PATH = '/opt/ncarg/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/mezianem/bin:/home/mezianem/.local/bin:/home/mezianem/bin:/usr/lib64/qt5/bin:/usr/lib64/qt4/bin:/opt/idla-8.4/bin:/home/mezianem/bin' syntastic: 262.181295: getcwd() = '/home/mezianem/scripts/from_colleagues/local/nfrebourg' syntastic: 262.186447: CacheErrors: Invoking checker: python/pylint syntastic: 262.191607: SyntasticMake: called with options: {'errorformat': '%A%f:%l:%c:%t: %m,%A%f:%l: %m,%A%f:(%l): %m,%-Z%p^%.%#,%-G%.%#', 'makeprg': 'pylint -f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n cartstationplot.py', 'env': {'TERM': 'dumb'}, '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: 263.319270: system: command run in 1.122076s syntastic: 263.320884: checker output: ['***** Module cartstationplot', 'cartstationplot.py:40:0:C: [line-too-long] Line too long (103/100)', 'cartstationplot.py:46:0:C: [line-too-long] Line too long (103/100)', 'cartstationplot.py:65:16:C: [bad-whitespace] Exactly one space required after comma', 'for i in range(0,Lsta.shape[0]):', ' ^', 'cartstationplot.py:67:0:C: [bad-continuation] Wrong hanging indentation (remove 16 spaces).', ' station=Lsta[''station''][i]),', ' | ^', 'cartstationplot.py:69:13:C: [bad-whitespace] Exactly one space required after comma', ' Lsta.at[i,''Nobs''] = int(data_obs.shape[0])', ' ^', 'cartstationplot.py:72:18:C: [trailing-whitespace] Trailing whitespace', 'cartstationplot.py:74:28:C: [bad-whitespace] Exactly one space required after comma', 'ax = fig.add_subplot(1, 1, 1,projection=ccrs.PlateCarree())', ' ^', 'cartstationplot.py:80:67:C: [trailing-whitespace] Trailing whitespace', 'cartstationplot.py:80:55:C: [bad-whitespace] Exactly one space required after comma', 'ax.scatter(np.array(Lsta[''lon'']), np.array(Lsta[''lat'']),s=dot_size, ', ' ^', 'cartstationplot.py:81:0:C: [bad-continuation] Wrong continued indentation (add 3 spaces).', ' color =''red'', label="AOD Station", zorder=100)', ' ^ |', 'cartstationplot.py:81:14:C: [bad-whitespace] No space allowed before keyword argument assignment', ' color =''red'', label="AOD Station", zorder=100)', ' ^', 'cartstationplot.py:82:52:C: [bad-whitespace] Exactly one space required after comma', 'ax.text(-15, 61, ''Nb stations : ''+str(Lsta.shape[0]),color=''dimgrey'',', ' ^', 'cartstationplot.py:83:34:C: [bad-whitespace] Exactly one space required after comma', ' horizontalalignment=''left'',transform=ccrs.Geodetic())', ' ^', 'cartstationplot.py:85:18:C: [bad-whitespace] Exactly one space required after comma', 'ax.set_extent([-15,15,29.9,60.1])', ' ^', 'cartstationplot.py:85:21:C: [bad-whitespace] Exactly one space required after comma', 'ax.set_extent([-15,15,29.9,60.1])', ' ^', 'cartstationplot.py:85:26:C: [bad-whitespace] Exactly one space required after comma', 'ax.set_extent([-15,15,29.9,60.1])', ' ^', 'cartstationplot.py:91:34:C: [bad-whitespace] Exactly one space required after comma', 'plt.savefig(''MapofStationsAOD.png'',bbox_inches=''tight'')', ' ^', 'cartstationplot.py:105:23:C: [trailing-whitespace] Trailing whitespace', 'cartstationplot.py:124:28:C: [bad-whitespace] Exactly one space required after comma', 'ax = fig.add_subplot(1, 1, 1,projection=ccrs.PlateCarree())', ' ^', 'cartstationplot.py:125:33:C: [bad-whitespace] Exactly one space required after comma', 'ax.scatter(aod_lon, aod_lat, s=10,color =''red'',label="AOD Station",zorder=100)', ' ^', 'cartstationplot.py:125:40:C: [bad-whitespace] No space allowed before keyword argument assignment', 'ax.scatter(aod_lon, aod_lat, s=10,color =''red'',label="AOD Station",zorder=100)', ' ^', 'cartstationplot.py:125:46:C: [bad-whitespace] Exactly one space required after comma', 'ax.scatter(aod_lon, aod_lat, s=10,color =''red'',label="AOD Station",zorder=100)', ' ^', 'cartstationplot.py:125:66:C: [bad-whitespace] Exactly one space required after comma', 'ax.scatter(aod_lon, aod_lat, s=10,color =''red'',label="AOD Station",zorder=100)', ' ^', 'cartstationplot.py:129:55:C: [bad-whitespace] Exactly one space required after comma', 'plt.figtext(0.1, 0.90, ''Nb stations : ''+str(len(staPM)),color=''dimgrey'',', ' ^', 'cartstationplot.py:130:0:C: [bad-continuation] Wrong continued indentation (add 4 spaces).', ' horizontalalignment=''left'',transform=ccrs.Geodetic())', ' ^ |', 'cartstationplot.py:130:34:C: [bad-whitespace] Exactly one space required after comma', ' horizontalalignment=''left'',transform=ccrs.Geodetic())', ' ^', 'cartstationplot.py:133:18:C: [bad-whitespace] Exactly one space required after comma', 'ax.set_extent([-20,20,29.9,60.1])', ' ^', 'cartstationplot.py:133:21:C: [bad-whitespace] Exactly one space required after comma', 'ax.set_extent([-20,20,29.9,60.1])', ' ^', 'cartstationplot.py:133:26:C: [bad-whitespace] Exactly one space required after comma', 'ax.set_extent([-20,20,29.9,60.1])', ' ^', 'cartstationplot.py:143:42:C: [bad-whitespace] Exactly one space required after comma', 'plt.savefig(''MapofStationsAOD_Sim2017.png'',bbox_inches=''tight'')', ' ^', 'cartstationplot.py:149:16:C: [bad-whitespace] Exactly one space required after comma', 'for i in range(0,len(staPM)):', ' ^', 'cartstationplot.py:150:14:C: [bad-whitespace] Exactly one space required around assignment', ' NselectSta=i', ' ^', 'cartstationplot.py:151:11:C: [bad-whitespace] Exactly one space required around assignment', ' sel_lon=aod_lon[NselectSta]', ' ^', 'cartstationplot.py:152:11:C: [bad-whitespace] Exactly one space required around assignment', ' sel_lat=aod_lat[NselectSta]', ' ^', 'cartstationplot.py:153:12:C: [bad-whitespace] Exactly one space required around assignment', ' sel_name=staAOD[NselectSta]', ' ^', 'cartstationplot.py:157:1:C: [trailing-whitespace] Trailing whitespace', 'cartstationplot.py:159:18:C: [bad-whitespace] Exactly one space required after comma', ' print("Lat = ",sel_lat)', ' ^', 'cartstationplot.py:160:18:C: [bad-whitespace] Exactly one space required after comma', ' print("Lon = ",sel_lon)', ' ^', 'cartstationplot.py:163:32:C: [bad-whitespace] Exactly one space required after comma', ' ax = fig.add_subplot(1, 1, 1,projection=ccrs.PlateCarree())', ' ^', 'cartstationplot.py:164:37:C: [bad-whitespace] Exactly one space required after comma', ' ax.scatter(aod_lon, aod_lat, s=20,color =''red'',label="AOD Station",', ' ^', 'cartstationplot.py:164:44:C: [bad-whitespace] No space allowed before keyword argument assignment', ' ax.scatter(aod_lon, aod_lat, s=20,color =''red'',label="AOD Station",', ' ^', 'cartstationplot.py:164:50:C: [bad-whitespace] Exactly one space required after comma', ' ax.scatter(aod_lon, aod_lat, s=20,color =''red'',label="AOD Station",', ' ^', 'cartstationplot.py:165:0:C: [bad-continuation] Wrong continued indentation (add 3 spaces).', ' zorder=100)', ' ^ |', 'cartstationplot.py:168:22:C: [bad-whitespace] Exactly one space required after comma', ' ax.scatter(sel_lon,sel_lat, s=100, color=''orange'',marker='''',', ' ^', 'cartstationplot.py:168:53:C: [bad-whitespace] Exactly one space required after comma', ' ax.scatter(sel_lon,sel_lat, s=100, color=''orange'',marker='''',', ' ^', 'cartstationplot.py:169:0:C: [bad-continuation] Wrong continued indentation (add 3 spaces).', ' edgecolors =''black'', label=sel_name,zorder=101)', ' ^ |', 'cartstationplot.py:169:23:C: [bad-whitespace] No space allowed before keyword argument assignment', ' edgecolors =''black'', label=sel_name,zorder=101)', ' ^', 'cartstationplot.py:169:47:C: [bad-whitespace] Exactly one space required after comma', ' edgecolors =''black'', label=sel_name,zorder=101)', ' ^', 'cartstationplot.py:171:24:C: [bad-whitespace] Exactly one space required after comma', ' ax.set_extent([-19.9,39.9,16.1,51.9])', ' ^', 'cartstationplot.py:171:29:C: [bad-whitespace] Exactly one space required after comma', ' ax.set_extent([-19.9,39.9,16.1,51.9])', ' ^', 'cartstationplot.py:171:34:C: [bad-whitespace] Exactly one space required after comma', ' ax.set_extent([-19.9,39.9,16.1,51.9])', ' ^', 'cartstationplot.py:174:0:C: [bad-continuation] Wrong continued indentation (add 4 spaces).', ' linewidth=0.5, color=''gray'', alpha=0.5, linestyle=''--'')', ' ^ |'] syntastic: 268.361769: python/pylint raw: [] syntastic: 268.392066: quiet_messages filter: {} syntastic: 268.421899: getLocList: checker python/pylint run in 6.230481s syntastic: 268.452077: aggregated: {'_sorted': 0, '_name': '', '_owner': 1, '_columns': 1, '_rawLoclist': []}
err.log
..and nothing looks really wrong to me :/ .. (is that right ?) I think that the error comes from the very large list of syntaxic mistakes spotted by the checker. When I split the file into smaller subparts, everything seems to work fine but I do not have any certainty about the origin of the problem. If it's indeed a problem about the size of the syntax error list, is there anyway to solve this issue ?
Many thanks