vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

syntastic checker output: python: can''t open file #2400

Closed usualMortal closed 2 years ago

usualMortal commented 2 years ago

Good day. I'm using syntastic on Vim, windows 10 and I can't get it to work for me. I've pinned the error down to: syntastic: 1599.591099: checker output: ['python: can''t open file "C:\\Users\\xxx\\''C:\\Users\\xxx\\Documents\\vimfiles\\bundle\\syntastic\\syntax_checkers\\python\\compile.py''": [Errno 22] Invalid argument', '']

I've set g:syntastic_debug=19, here is the output of SyntasticCheck python:

syntastic: 47.440384: g:syntastic_version = '3.10.0-32 (Vim 802, Windows)'
syntastic: 47.440680: &shell = 'C:\Windows\system32\cmd.exe', &shellcmdflag = '/c', &shellpipe = '>%s 2>&1', &shellquote = '', &shellredir = '>%s 2>&1', &shelltemp = 1, &shellxquote = '(', &autochdir = 0, &shellslash = 1 (!), &shellxescape
= '"&|<>()@^'
syntastic: 47.441757: g:syntastic_aggregate_errors = 0
syntastic: 47.441757: g:syntastic_always_populate_loc_list = 0
syntastic: 47.441757: g:syntastic_auto_jump = 0
syntastic: 47.441757: g:syntastic_auto_loc_list = 2
syntastic: 47.441757: g:syntastic_check_on_open = 0
syntastic: 47.441757: g:syntastic_check_on_wq = 1
syntastic: 47.441757: g:syntastic_cursor_columns = 1
syntastic: 47.441757: g:syntastic_debug = 19
syntastic: 47.441757: g:syntastic_echo_current_error = 1
syntastic: 47.441757: g:syntastic_enable_balloons = 0
syntastic: 47.441757: g:syntastic_enable_highlighting = 1
syntastic: 47.441757: g:syntastic_enable_signs = 1
syntastic: 47.441757: g:syntastic_error_symbol = '>>'
syntastic: 47.441757: g:syntastic_exit_checks = 0
syntastic: 47.441757: g:syntastic_filetype_map = {}
syntastic: 47.441757: g:syntastic_full_redraws = 1
syntastic: 47.441757: g:syntastic_id_checkers = 1
syntastic: 47.441757: g:syntastic_ignore_extensions = '\c\v^([gx]?z|lzma|bz2)$'
syntastic: 47.441757: g:syntastic_ignore_files = []
syntastic: 47.441757: g:syntastic_loc_list_height = 10
syntastic: 47.441757: g:syntastic_nested_autocommands = 0
syntastic: 47.441757: g:syntastic_quiet_messages = {}
syntastic: 47.441757: g:syntastic_reuse_loc_lists = 1
syntastic: 47.441757: g:syntastic_shell = 'C:\Windows\system32\cmd.exe'
syntastic: 47.441757: g:syntastic_sort_aggregated_errors = 1
syntastic: 47.441757: g:syntastic_stl_format = '[Syntax: line:%F (%t)]'
syntastic: 47.441757: g:syntastic_style_error_symbol = 'S>'
syntastic: 47.441757: g:syntastic_style_warning_symbol = 'S>'
syntastic: 47.441757: g:syntastic_warning_symbol = '>>'
syntastic: 47.459519: UpdateErrors: python
syntastic: 47.460144: CacheErrors: python
syntastic: 47.461001: g:syntastic_aggregate_errors = 0
syntastic: 47.461555: getcwd() = 'C:/Users/xxx'
syntastic: 47.580815: system: command run in 0.073678s
syntastic: 47.581373: CacheErrors: Invoking checker: python/python
syntastic: 47.582157: SyntasticMake: called with options: {'errorformat': '%E%f:%l:%c: %m', 'makeprg': 'python ''C:/Users/xxx/Documents/vimfiles/bundle/syntastic/syntax_checkers/python/compile.py'' ''C:/Users/xxx/Documents/mePython/get_ms.py''', 'env': {}, 'returns': [0]}
syntastic: 47.675899: system: command run in 0.092549s
syntastic: 47.676357: checker output: ['python: can''t open file "C:\\Users\\xxx\\''C:\\Users\\xxx\\Documents\\vimfiles\\bundle\\syntastic\\syntax_checkers\\python\\compile.py''": [Errno 22] Invalid argument', '']
syntastic: 47.677055: raw loclist: [{'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'module': '', 'type': '', 'col': 0, 'end_col': 0, 'pattern': '', 'text': 'python: can''t open file "C:\\Users\\xxx\\''C:\\Users\\xxx\\Documents\\vimfiles\\bundle\\syntastic\\syntax_checkers\\python\\compile.py''": [Errno 22] Invalid argument'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'module': '', 'type': '', 'col': 0, 'end_col': 0, 'pattern': '', 'text': ''}]
syntastic: 47.678563: getLocList: checker python/python returned 2
syntastic: 47.679008: python/python raw: [{'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'module': '', 'type': '', 'col': 0, 'end_col': 0, 'pattern': '', 'text': 'python: can''t open file "C:\\Users\\xxx\\''C:\\Users\\xxx\\Documents\\vimfiles\\bundle\\syntastic\\syntax_checkers\\python\\compile.py''": [Errno 22] Invalid argument'}, {'lnum': 0, 'bufnr': 0, 'end_lnum': 0, 'valid': 0, 'vcol': 0, 'nr': -1, 'module': '', 'type': '', 'col': 0, 'end_col': 0, 'pattern': '', 'text': ''}]
syntastic: 47.680569: quiet_messages filter: {}
syntastic: 47.681021: getLocList: checker python/python run in 0.099276s
syntastic: 47.681599: aggregated: {'_sorted': 0, '_name': '', '_owner': 1, '_columns': 1, '_rawLoclist': []}

I'd appreciate any help. Thank you.

lcd047 commented 2 years ago

&shellslash = 1

Please read: :h syntastic-shellslash.

I'm using syntastic on Vim, windows 10

You shouldn't, syntastic should only be used with Vim 7 legacy systems these days. You might consider switching to [ALE]ALE instead, which is actively maintained and takes advantage of Vim 8 features.

usualMortal commented 2 years ago

Thanks for the feedback. I've tried to set that variable but with no success, probably I was doing smth wrong. Doesn't matter anyways since switching to ALE is recommended.