At first I thought this was #369 until I realized it's in a different file (plus I tried manually applying the fix that was made for it, and it didn't resolve the issue).
I'm trying to get pylsp working with nvim-lspconfig in neovim. If I just use default settings, something seems to work, but as soon as I try configuring pylsp, I get errors like this:
Traceback (most recent call last):
File \"/usr/lib/python3.11/site-packages/pylsp/plugins/flake8_lint.py\", line 108, in run_flake8
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=document._workspace.root_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/subprocess.py\", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File \"/usr/lib/python3.11/subprocess.py\", line 1917, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File \"/usr/lib/python3.11/site-packages/pylsp/config/config.py\", line 33, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/site-packages/pluggy/_manager.py\", line 418, in traced_hookexec
return outcome.get_result()
^^^^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/site-packages/pluggy/_result.py\", line 108, in get_result
raise exc.with_traceback(exc.__traceback__)
File \"/usr/lib/python3.11/site-packages/pluggy/_result.py\", line 70, in from_call
result = func()
^^^^^^
File \"/usr/lib/python3.11/site-packages/pluggy/_manager.py\", line 415, in <lambda>
lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/site-packages/pluggy/_callers.py\", line 116, in _multicall
raise exception.with_traceback(exception.__traceback__)
File \"/usr/lib/python3.11/site-packages/pluggy/_callers.py\", line 80, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/site-packages/pylsp/plugins/flake8_lint.py\", line 83, in pylsp_lint
output = run_flake8(flake8_executable, args, document)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/site-packages/pylsp/plugins/flake8_lint.py\", line 113, in run_flake8
p = Popen( # pylint: disable=consider-using-with
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/usr/lib/python3.11/subprocess.py\", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File \"/usr/lib/python3.11/subprocess.py\", line 1917, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ''
At first I thought this was #369 until I realized it's in a different file (plus I tried manually applying the fix that was made for it, and it didn't resolve the issue).
I'm trying to get pylsp working with nvim-lspconfig in neovim. If I just use default settings, something seems to work, but as soon as I try configuring pylsp, I get errors like this:
Here's the config I'm using in NeoVim: