If ruff is not exists in the environment, all lint processes in pylsp will stop working
yaegassy opened this issue · 6 comments
Description
python-lsp-ruff gives the following error if ruff is not in the environment. This error appears to cause all lint processes served by pylsp to stop.
2023-01-06 19:02:47,691 JST - WARNING - pylsp.config.config - Failed to load hook pylsp_lint: [Errno 2] No such file or directory: 'ruff'
Traceback (most recent call last):
// ...snip
FileNotFoundError: [Errno 2] No such file or directory: 'ruff'
I think it might be necessary to make some adjustments, such as checked the exists of a ruff command.
Can you check with -vvv --log-file /tmp/lsp.log if the error really happens when calling ruff? Because I would expect an error of type "Error running ruff ..."
I used pylsp in Vim/Neovim's LSP client plugin. Below are the reproduce step and logs.
I have checked that ruff is present in the dependencies of python-lsp-ruff. https://github.com/python-lsp/python-lsp-ruff/blob/main/pyproject.toml#L16
However, there is no ruff command in the execution path for pylsp prepared as follows.
Repro
- Create a venv for pylsp and install python-lsp-server and python-lsp-ruff
Note: This may be similar to the case of pipx to prepare pylsp. https://github.com/pypa/pipx
mkdir -p $HOME/ls/pylsp
cd $HOME/ls/pylsp
python3 -m venv venv
$HOME/ls/pylsp/venv/bin/pip3 install -U python-lsp-server python-lsp-ruff
- Edit python files using the language server above
mkdir -p $HOME/dummy_proj
cd $HOME/dummy_proj
nvim sample.py
Log
Debug log
2023-01-07 00:59:48,128 JST - INFO - pylsp.python_lsp - Starting PythonLSPServer IO language server
2023-01-07 00:59:48,128 JST - DEBUG - pylsp_jsonrpc.endpoint - Handling request from client {'jsonrpc': '2.0', 'id': 0, 'method': 'initialize', 'params': {'processId': 56043, 'rootPath': '/Users/yaegassy/dummy_proj', 'rootUri': 'file:///Users/yaegassy/dummy_proj', 'capabilities': {'workspace': {'applyEdit': True, 'workspaceEdit': {'documentChanges': True, 'resourceOperations': ['create', 'rename', 'delete'], 'failureHandling': 'undo', 'normalizesLineEndings': True, 'changeAnnotationSupport': {'groupsOnLabel': False}}, 'didChangeConfiguration': {'dynamicRegistration': True}, 'didChangeWatchedFiles': {'dynamicRegistration': True, 'relativePatternSupport': True}, 'codeLens': {'refreshSupport': True}, 'executeCommand': {'dynamicRegistration': True}, 'configuration': True, 'fileOperations': {'dynamicRegistration': True, 'didCreate': True, 'didRename': True, 'didDelete': True, 'willCreate': True, 'willRename': True, 'willDelete': True}, 'semanticTokens': {'refreshSupport': True}, 'inlayHint': {'refreshSupport': True}, 'inlineValue': {'refreshSupport': True}, 'diagnostics': {'refreshSupport': True}, 'symbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [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]}, 'tagSupport': {'valueSet': [1]}, 'resolveSupport': {'properties': ['location.range']}}, 'workspaceFolders': True}, 'textDocument': {'publishDiagnostics': {'relatedInformation': True, 'versionSupport': True, 'tagSupport': {'valueSet': [1, 2]}, 'codeDescriptionSupport': True, 'dataSupport': True}, 'synchronization': {'dynamicRegistration': True, 'willSave': True, 'willSaveWaitUntil': True, 'didSave': True}, 'completion': {'dynamicRegistration': True, 'contextSupport': True, 'completionItem': {'snippetSupport': True, 'commitCharactersSupport': True, 'documentationFormat': ['markdown', 'plaintext'], 'deprecatedSupport': True, 'preselectSupport': True, 'insertReplaceSupport': True, 'tagSupport': {'valueSet': [1]}, 'resolveSupport': {'properties': ['documentation', 'detail', 'additionalTextEdits']}, 'labelDetailsSupport': True, 'insertTextModeSupport': {'valueSet': [1, 2]}}, 'completionItemKind': {'valueSet': [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]}, 'insertTextMode': 2, 'completionList': {'itemDefaults': ['commitCharacters', 'editRange', 'insertTextFormat', 'insertTextMode']}}, 'hover': {'dynamicRegistration': True, 'contentFormat': ['markdown', 'plaintext']}, 'signatureHelp': {'dynamicRegistration': True, 'contextSupport': True, 'signatureInformation': {'documentationFormat': ['markdown', 'plaintext'], 'activeParameterSupport': True, 'parameterInformation': {'labelOffsetSupport': True}}}, 'references': {'dynamicRegistration': True}, 'definition': {'dynamicRegistration': True, 'linkSupport': True}, 'documentHighlight': {'dynamicRegistration': True}, 'documentSymbol': {'dynamicRegistration': True, 'symbolKind': {'valueSet': [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]}, 'hierarchicalDocumentSymbolSupport': True, 'tagSupport': {'valueSet': [1]}, 'labelSupport': True}, 'codeAction': {'dynamicRegistration': True, 'isPreferredSupport': True, 'disabledSupport': True, 'dataSupport': True, 'honorsChangeAnnotations': False, 'resolveSupport': {'properties': ['edit']}, 'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['', 'quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source', 'source.organizeImports']}}}, 'codeLens': {'dynamicRegistration': True}, 'formatting': {'dynamicRegistration': True}, 'rangeFormatting': {'dynamicRegistration': True}, 'onTypeFormatting': {'dynamicRegistration': True}, 'rename': {'dynamicRegistration': True, 'prepareSupport': True, 'honorsChangeAnnotations': True, 'prepareSupportDefaultBehavior': 1}, 'documentLink': {'dynamicRegistration': True, 'tooltipSupport': True}, 'typeDefinition': {'dynamicRegistration': True, 'linkSupport': True}, 'implementation': {'dynamicRegistration': True, 'linkSupport': True}, 'declaration': {'dynamicRegistration': True, 'linkSupport': True}, 'colorProvider': {'dynamicRegistration': True}, 'foldingRange': {'dynamicRegistration': True, 'rangeLimit': 5000, 'lineFoldingOnly': True, 'foldingRangeKind': {'valueSet': ['comment', 'imports', 'region']}, 'foldingRange': {'collapsedText': False}}, 'selectionRange': {'dynamicRegistration': True}, 'callHierarchy': {'dynamicRegistration': True}, 'linkedEditingRange': {'dynamicRegistration': True}, 'semanticTokens': {'dynamicRegistration': True, 'tokenTypes': ['namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'decorator', 'operator'], 'tokenModifiers': ['declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', 'modification', 'documentation', 'defaultLibrary'], 'formats': ['relative'], 'requests': {'range': True, 'full': {'delta': True}}, 'multilineTokenSupport': False, 'overlappingTokenSupport': False, 'serverCancelSupport': True, 'augmentsSyntaxTokens': True}, 'inlayHint': {'dynamicRegistration': True, 'resolveSupport': {'properties': ['tooltip', 'textEdits', 'label.tooltip', 'label.location', 'label.command']}}, 'inlineValue': {'dynamicRegistration': True}, 'diagnostic': {'dynamicRegistration': True, 'relatedDocumentSupport': True}, 'typeHierarchy': {'dynamicRegistration': True}}, 'window': {'showMessage': {'messageActionItem': {'additionalPropertiesSupport': True}}, 'showDocument': {'support': True}, 'workDoneProgress': True}, 'general': {'regularExpressions': {'engine': 'ECMAScript', 'version': 'ES2020'}, 'markdown': {'parser': 'marked', 'version': '4.0.10'}, 'positionEncodings': ['utf-16'], 'staleRequestSupport': {'cancel': True, 'retryOnContentModified': ['textDocument/inlayHint', 'textDocument/semanticTokens/full', 'textDocument/semanticTokens/range', 'textDocument/semanticTokens/full/delta']}}}, 'initializationOptions': {}, 'trace': 'off', 'workspaceFolders': [{'uri': 'file:///Users/yaegassy/dummy_proj', 'name': 'dummy_proj'}], 'locale': 'ja_JP', 'clientInfo': {'name': 'coc.nvim', 'version': '0.0.82'}}}
2023-01-07 00:59:48,128 JST - DEBUG - pylsp.python_lsp - Language server initialized with 56043 file:///Users/yaegassy/dummy_proj /Users/yaegassy/dummy_proj {}
2023-01-07 00:59:48,179 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'autopep8': No module named 'pycodestyle'
2023-01-07 00:59:48,183 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'mccabe': No module named 'mccabe'
2023-01-07 00:59:48,183 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'pycodestyle': No module named 'pycodestyle'
2023-01-07 00:59:48,183 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'pydocstyle': No module named 'pydocstyle'
2023-01-07 00:59:48,184 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'pyflakes': No module named 'pyflakes'
2023-01-07 00:59:48,184 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'rope_autoimport': No module named 'rope'
2023-01-07 00:59:48,185 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'rope_completion': No module named 'rope'
2023-01-07 00:59:48,185 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'rope_rename': No module named 'rope'
2023-01-07 00:59:48,185 JST - INFO - pylsp.config.config - Failed to load pylsp entry point 'yapf': No module named 'yapf'
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin pylsp_ruff from <module 'pylsp_ruff.ruff_lint' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp_ruff/ruff_lint.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin flake8 from <module 'pylsp.plugins.flake8_lint' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/flake8_lint.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin folding from <module 'pylsp.plugins.folding' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/folding.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_completion from <module 'pylsp.plugins.jedi_completion' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/jedi_completion.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_definition from <module 'pylsp.plugins.definition' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/definition.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_highlight from <module 'pylsp.plugins.highlight' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/highlight.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_hover from <module 'pylsp.plugins.hover' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/hover.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_references from <module 'pylsp.plugins.references' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/references.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_rename from <module 'pylsp.plugins.jedi_rename' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/jedi_rename.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_signature_help from <module 'pylsp.plugins.signature' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/signature.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin jedi_symbols from <module 'pylsp.plugins.symbols' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/symbols.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin preload from <module 'pylsp.plugins.preload_imports' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/preload_imports.py'>
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Loaded pylsp plugin pylint from <module 'pylsp.plugins.pylint_lint' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/pylint_lint.py'>
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.config.config - pylsp_settings [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.config.config - finish pylsp_settings --> [{'plugins': {'pylint': {'enabled': False, 'args': [], 'executable': None}}}, {'plugins': {'preload': {'modules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}}, 'rope': {'extensionModules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}}, {'plugins': {'flake8': {'enabled': False}}}, {'plugins': {'ruff': {'enabled': True, 'config': None, 'exclude': None, 'executable': 'ruff', 'ignore': None, 'lineLength': None, 'perFileIgnores': None, 'select': None}, 'pyflakes': {'enabled': False}, 'flake8': {'enabled': False}, 'mccabe': {'enabled': False}, 'pycodestyle': {'enabled': False}}}] [hook]
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.config.config - With configuration: {'rope': {'extensionModules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}, 'plugins': {'ruff': {'enabled': True, 'config': None, 'exclude': None, 'executable': 'ruff', 'ignore': None, 'lineLength': None, 'perFileIgnores': None, 'select': None}, 'pycodestyle': {'enabled': False}, 'pylint': {'enabled': False, 'args': [], 'executable': None}, 'preload': {'modules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}, 'mccabe': {'enabled': False}, 'pyflakes': {'enabled': False}, 'flake8': {'enabled': False}}}
2023-01-07 00:59:48,189 JST - INFO - pylsp.config.config - Disabled plugins: [None, None, None, <module 'pylsp.plugins.flake8_lint' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/flake8_lint.py'>, <module 'pylsp.plugins.pylint_lint' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/pylint_lint.py'>]
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.config.config - pylsp_dispatchers [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: None
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.config.config - finish pylsp_dispatchers --> [] [hook]
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.config.config - pylsp_initialize [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: None
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.config.config - With configuration: {'rope': {'extensionModules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}, 'plugins': {'ruff': {'enabled': True, 'config': None, 'exclude': None, 'executable': 'ruff', 'ignore': None, 'lineLength': None, 'perFileIgnores': None, 'select': None}, 'pycodestyle': {'enabled': False}, 'pylint': {'enabled': False, 'args': [], 'executable': None}, 'preload': {'modules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}, 'mccabe': {'enabled': False}, 'pyflakes': {'enabled': False}, 'flake8': {'enabled': False}}}
2023-01-07 00:59:48,189 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module array
2023-01-07 00:59:48,190 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module audioop
2023-01-07 00:59:48,190 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module binascii
2023-01-07 00:59:48,190 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module cmath
2023-01-07 00:59:48,190 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module collections
2023-01-07 00:59:48,190 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module datetime
2023-01-07 00:59:48,190 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module errno
2023-01-07 00:59:48,190 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module gc
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module imp
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module itertools
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module marshal
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module math
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module mmap
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module operator
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module os
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module os.path
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module signal
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module sys
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module time
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module xxsubtype
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module zipimport
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.plugins.preload_imports - Preloaded module zlib
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.config.config - finish pylsp_initialize --> [] [hook]
2023-01-07 00:59:48,191 JST - DEBUG - pylsp.config.config - pylsp_commands [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: None
2023-01-07 00:59:48,192 JST - DEBUG - pylsp.config.config - finish pylsp_commands --> [] [hook]
2023-01-07 00:59:48,192 JST - DEBUG - pylsp.config.config - pylsp_experimental_capabilities [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: None
2023-01-07 00:59:48,192 JST - DEBUG - pylsp.config.config - finish pylsp_experimental_capabilities --> [] [hook]
2023-01-07 00:59:48,192 JST - INFO - pylsp.python_lsp - Server capabilities: {'codeActionProvider': True, 'codeLensProvider': {'resolveProvider': False}, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.']}, 'documentFormattingProvider': True, 'documentHighlightProvider': True, 'documentRangeFormattingProvider': True, 'documentSymbolProvider': True, 'definitionProvider': True, 'executeCommandProvider': {'commands': []}, 'hoverProvider': True, 'referencesProvider': True, 'renameProvider': True, 'foldingRangeProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '=']}, 'textDocumentSync': {'change': 2, 'save': {'includeText': True}, 'openClose': True}, 'workspace': {'workspaceFolders': {'supported': True, 'changeNotifications': True}}, 'experimental': {}}
2023-01-07 00:59:48,192 JST - DEBUG - pylsp_jsonrpc.endpoint - Got result from synchronous request handler: {'capabilities': {'codeActionProvider': True, 'codeLensProvider': {'resolveProvider': False}, 'completionProvider': {'resolveProvider': True, 'triggerCharacters': ['.']}, 'documentFormattingProvider': True, 'documentHighlightProvider': True, 'documentRangeFormattingProvider': True, 'documentSymbolProvider': True, 'definitionProvider': True, 'executeCommandProvider': {'commands': []}, 'hoverProvider': True, 'referencesProvider': True, 'renameProvider': True, 'foldingRangeProvider': True, 'signatureHelpProvider': {'triggerCharacters': ['(', ',', '=']}, 'textDocumentSync': {'change': 2, 'save': {'includeText': True}, 'openClose': True}, 'workspace': {'workspaceFolders': {'supported': True, 'changeNotifications': True}}, 'experimental': {}}, 'serverInfo': {'name': 'pylsp', 'version': '1.7.0'}}
2023-01-07 00:59:48,193 JST - DEBUG - pylsp_jsonrpc.endpoint - Handling notification from client {'jsonrpc': '2.0', 'method': 'initialized', 'params': {}}
2023-01-07 00:59:48,193 JST - DEBUG - pylsp.config.config - pylsp_initialized [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: None
2023-01-07 00:59:48,193 JST - DEBUG - pylsp.config.config - finish pylsp_initialized --> [] [hook]
2023-01-07 00:59:48,195 JST - DEBUG - pylsp_jsonrpc.endpoint - Handling notification from client {'jsonrpc': '2.0', 'method': 'workspace/didChangeConfiguration', 'params': {'settings': {'pylsp': {'enable': True, 'trace': {'server': 'off'}, 'commandPath': '/Users/yaegassy/ls/pylsp/venv/bin/pylsp', 'connectionMode': 'stdio', 'tcpHost': '127.0.0.1', 'tcpPort': '2087', 'builtin': {'pythonPath': '', 'installExtrasArgs': ['flake8', 'mccabe', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylint', 'rope'], 'enableInstallPylspMypy': True, 'enableInstallPylsIsort': True, 'enableInstallPythonLspBlack': True, 'enableInstallPylspRope': True, 'pylspMypyVersion': '', 'pylsIsortVersion': '', 'pythonLspBlackVersion': '', 'pylspRopeVersion': ''}, 'configurationSources': ['pycodestyle'], 'plugins': {'autopep8': {'enabled': True}, 'flake8': {'config': None, 'enabled': True, 'exclude': [], 'executable': 'flake8', 'filename': None, 'hangClosing': None, 'ignore': [], 'maxLineLength': None, 'indentSize': None, 'perFileIgnores': [], 'select': None, 'maxComplexity': None}, 'jedi': {'auto_import_modules': ['numpy'], 'extra_paths': [], 'env_vars': None, 'environment': None}, 'jedi_completion': {'enabled': True, 'include_params': True, 'include_class_objects': False, 'include_function_objects': False, 'fuzzy': False, 'eager': False, 'resolve_at_most': 25, 'cache_for': ['pandas', 'numpy', 'tensorflow', 'matplotlib']}, 'jedi_definition': {'enabled': True, 'follow_imports': True, 'follow_builtin_imports': True, 'follow_builtin_definitions': True}, 'jedi_hover': {'enabled': True}, 'jedi_references': {'enabled': True}, 'jedi_signature_help': {'enabled': True}, 'jedi_symbols': {'enabled': True, 'all_scopes': True, 'include_import_symbols': True}, 'mccabe': {'enabled': True, 'threshold': 15}, 'preload': {'enabled': True, 'modules': []}, 'pycodestyle': {'enabled': True, 'exclude': [], 'filename': [], 'select': None, 'ignore': [], 'hangClosing': None, 'maxLineLength': None, 'indentSize': None}, 'pydocstyle': {'enabled': False, 'convention': None, 'addIgnore': [], 'addSelect': [], 'ignore': [], 'select': None, 'match': '(?!test_).*\\.py', 'matchDir': '[^\\.].*'}, 'pyflakes': {'enabled': False}, 'pylint': {'enabled': False, 'args': [], 'executable': None}, 'rope_autoimport': {'enabled': False, 'memory': False}, 'rope_completion': {'enabled': False, 'eager': False}, 'yapf': {'enabled': True}}, 'rope': {'extensionModules': None, 'ropeFolder': None}}}}}
2023-01-07 00:59:48,195 JST - INFO - pylsp.config.config - Updated settings to {'enable': True, 'trace': {'server': 'off'}, 'commandPath': '/Users/yaegassy/ls/pylsp/venv/bin/pylsp', 'connectionMode': 'stdio', 'tcpHost': '127.0.0.1', 'tcpPort': '2087', 'builtin': {'pythonPath': '', 'installExtrasArgs': ['flake8', 'mccabe', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylint', 'rope'], 'enableInstallPylspMypy': True, 'enableInstallPylsIsort': True, 'enableInstallPythonLspBlack': True, 'enableInstallPylspRope': True, 'pylspMypyVersion': '', 'pylsIsortVersion': '', 'pythonLspBlackVersion': '', 'pylspRopeVersion': ''}, 'configurationSources': ['pycodestyle'], 'plugins': {'autopep8': {'enabled': True}, 'flake8': {'config': None, 'enabled': True, 'exclude': [], 'executable': 'flake8', 'filename': None, 'hangClosing': None, 'ignore': [], 'maxLineLength': None, 'indentSize': None, 'perFileIgnores': [], 'select': None, 'maxComplexity': None}, 'jedi': {'auto_import_modules': ['numpy'], 'extra_paths': [], 'env_vars': None, 'environment': None}, 'jedi_completion': {'enabled': True, 'include_params': True, 'include_class_objects': False, 'include_function_objects': False, 'fuzzy': False, 'eager': False, 'resolve_at_most': 25, 'cache_for': ['pandas', 'numpy', 'tensorflow', 'matplotlib']}, 'jedi_definition': {'enabled': True, 'follow_imports': True, 'follow_builtin_imports': True, 'follow_builtin_definitions': True}, 'jedi_hover': {'enabled': True}, 'jedi_references': {'enabled': True}, 'jedi_signature_help': {'enabled': True}, 'jedi_symbols': {'enabled': True, 'all_scopes': True, 'include_import_symbols': True}, 'mccabe': {'enabled': True, 'threshold': 15}, 'preload': {'enabled': True, 'modules': []}, 'pycodestyle': {'enabled': True, 'exclude': [], 'filename': [], 'select': None, 'ignore': [], 'hangClosing': None, 'maxLineLength': None, 'indentSize': None}, 'pydocstyle': {'enabled': False, 'convention': None, 'addIgnore': [], 'addSelect': [], 'ignore': [], 'select': None, 'match': '(?!test_).*\\.py', 'matchDir': '[^\\.].*'}, 'pyflakes': {'enabled': False}, 'pylint': {'enabled': False, 'args': [], 'executable': None}, 'rope_autoimport': {'enabled': False, 'memory': False}, 'rope_completion': {'enabled': False, 'eager': False}, 'yapf': {'enabled': True}}, 'rope': {'extensionModules': None, 'ropeFolder': None}}
2023-01-07 00:59:48,195 JST - DEBUG - pylsp.config.config - With configuration: {'connectionMode': 'stdio', 'trace': {'server': 'off'}, 'enable': True, 'commandPath': '/Users/yaegassy/ls/pylsp/venv/bin/pylsp', 'tcpPort': '2087', 'configurationSources': ['pycodestyle'], 'builtin': {'pythonPath': '', 'installExtrasArgs': ['flake8', 'mccabe', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylint', 'rope'], 'enableInstallPylspMypy': True, 'enableInstallPylsIsort': True, 'enableInstallPythonLspBlack': True, 'enableInstallPylspRope': True, 'pylspMypyVersion': '', 'pylsIsortVersion': '', 'pythonLspBlackVersion': '', 'pylspRopeVersion': ''}, 'rope': {'extensionModules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}, 'tcpHost': '127.0.0.1', 'plugins': {'pycodestyle': {'filename': [], 'ignore': [], 'exclude': [], 'enabled': True}, 'pylint': {'args': [], 'executable': None, 'enabled': False}, 'jedi_signature_help': {'enabled': True}, 'pydocstyle': {'enabled': False, 'convention': None, 'addIgnore': [], 'addSelect': [], 'ignore': [], 'select': None, 'match': '(?!test_).*\\.py', 'matchDir': '[^\\.].*'}, 'yapf': {'enabled': True}, 'flake8': {'ignore': [], 'perFileIgnores': [], 'exclude': [], 'executable': 'flake8', 'enabled': True}, 'jedi': {'auto_import_modules': ['numpy'], 'extra_paths': [], 'env_vars': None, 'environment': None}, 'jedi_completion': {'enabled': True, 'include_params': True, 'include_class_objects': False, 'include_function_objects': False, 'fuzzy': False, 'eager': False, 'resolve_at_most': 25, 'cache_for': ['pandas', 'numpy', 'tensorflow', 'matplotlib']}, 'ruff': {'enabled': True, 'config': None, 'exclude': None, 'executable': 'ruff', 'ignore': None, 'lineLength': None, 'perFileIgnores': None, 'select': None}, 'rope_completion': {'enabled': False, 'eager': False}, 'preload': {'modules': ['os', 'audioop', 'binascii', 'marshal', 'imageop', 'datetime', 'scipy', 'statsmodels', 'PIL', 'skimage', 'wx', 'itertools', 'zlib', 'mpmath', 'cStringIO', 'msvcrt', 'array', 'signal', 'thread', 'xxsubtype', 'sklearn', 'cPickle', 'networkx', 'exceptions', 'parser', 'os.path', 'pandas', 'errno', 'nt', 'nose', 'math', 'sympy', 'imp', 'OpenGL', 'operator', 'collections', 'time', 'zipimport', 'sys', 'gc', 'rgbimg', 'cmath', 'matplotlib', 'numpy', 'mmap', 'strop'], 'enabled': True}, 'mccabe': {'threshold': 15, 'enabled': True}, 'jedi_hover': {'enabled': True}, 'jedi_references': {'enabled': True}, 'rope_autoimport': {'enabled': False, 'memory': False}, 'jedi_symbols': {'enabled': True, 'all_scopes': True, 'include_import_symbols': True}, 'pyflakes': {'enabled': False}, 'autopep8': {'enabled': True}, 'jedi_definition': {'enabled': True, 'follow_imports': True, 'follow_builtin_imports': True, 'follow_builtin_definitions': True}}}
2023-01-07 00:59:48,195 JST - INFO - pylsp.config.config - Disabled plugins: [None, None, None, None, <module 'pylsp.plugins.pylint_lint' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/pylint_lint.py'>]
2023-01-07 00:59:48,195 JST - INFO - pylsp.config.config - Updated settings to {'enable': True, 'trace': {'server': 'off'}, 'commandPath': '/Users/yaegassy/ls/pylsp/venv/bin/pylsp', 'connectionMode': 'stdio', 'tcpHost': '127.0.0.1', 'tcpPort': '2087', 'builtin': {'pythonPath': '', 'installExtrasArgs': ['flake8', 'mccabe', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylint', 'rope'], 'enableInstallPylspMypy': True, 'enableInstallPylsIsort': True, 'enableInstallPythonLspBlack': True, 'enableInstallPylspRope': True, 'pylspMypyVersion': '', 'pylsIsortVersion': '', 'pythonLspBlackVersion': '', 'pylspRopeVersion': ''}, 'configurationSources': ['pycodestyle'], 'plugins': {'autopep8': {'enabled': True}, 'flake8': {'config': None, 'enabled': True, 'exclude': [], 'executable': 'flake8', 'filename': None, 'hangClosing': None, 'ignore': [], 'maxLineLength': None, 'indentSize': None, 'perFileIgnores': [], 'select': None, 'maxComplexity': None}, 'jedi': {'auto_import_modules': ['numpy'], 'extra_paths': [], 'env_vars': None, 'environment': None}, 'jedi_completion': {'enabled': True, 'include_params': True, 'include_class_objects': False, 'include_function_objects': False, 'fuzzy': False, 'eager': False, 'resolve_at_most': 25, 'cache_for': ['pandas', 'numpy', 'tensorflow', 'matplotlib']}, 'jedi_definition': {'enabled': True, 'follow_imports': True, 'follow_builtin_imports': True, 'follow_builtin_definitions': True}, 'jedi_hover': {'enabled': True}, 'jedi_references': {'enabled': True}, 'jedi_signature_help': {'enabled': True}, 'jedi_symbols': {'enabled': True, 'all_scopes': True, 'include_import_symbols': True}, 'mccabe': {'enabled': True, 'threshold': 15}, 'preload': {'enabled': True, 'modules': []}, 'pycodestyle': {'enabled': True, 'exclude': [], 'filename': [], 'select': None, 'ignore': [], 'hangClosing': None, 'maxLineLength': None, 'indentSize': None}, 'pydocstyle': {'enabled': False, 'convention': None, 'addIgnore': [], 'addSelect': [], 'ignore': [], 'select': None, 'match': '(?!test_).*\\.py', 'matchDir': '[^\\.].*'}, 'pyflakes': {'enabled': False}, 'pylint': {'enabled': False, 'args': [], 'executable': None}, 'rope_autoimport': {'enabled': False, 'memory': False}, 'rope_completion': {'enabled': False, 'eager': False}, 'yapf': {'enabled': True}}, 'rope': {'extensionModules': None, 'ropeFolder': None}}
2023-01-07 00:59:48,195 JST - DEBUG - pylsp.config.config - With configuration: {'connectionMode': 'stdio', 'trace': {'server': 'off'}, 'enable': True, 'commandPath': '/Users/yaegassy/ls/pylsp/venv/bin/pylsp', 'tcpPort': '2087', 'configurationSources': ['pycodestyle'], 'builtin': {'pythonPath': '', 'installExtrasArgs': ['flake8', 'mccabe', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylint', 'rope'], 'enableInstallPylspMypy': True, 'enableInstallPylsIsort': True, 'enableInstallPythonLspBlack': True, 'enableInstallPylspRope': True, 'pylspMypyVersion': '', 'pylsIsortVersion': '', 'pythonLspBlackVersion': '', 'pylspRopeVersion': ''}, 'rope': {'extensionModules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}, 'tcpHost': '127.0.0.1', 'plugins': {'pycodestyle': {'filename': [], 'ignore': [], 'exclude': [], 'enabled': True}, 'pylint': {'args': [], 'executable': None, 'enabled': False}, 'jedi_signature_help': {'enabled': True}, 'pydocstyle': {'enabled': False, 'convention': None, 'addIgnore': [], 'addSelect': [], 'ignore': [], 'select': None, 'match': '(?!test_).*\\.py', 'matchDir': '[^\\.].*'}, 'yapf': {'enabled': True}, 'flake8': {'ignore': [], 'perFileIgnores': [], 'exclude': [], 'executable': 'flake8', 'enabled': True}, 'jedi': {'auto_import_modules': ['numpy'], 'extra_paths': [], 'env_vars': None, 'environment': None}, 'jedi_completion': {'enabled': True, 'include_params': True, 'include_class_objects': False, 'include_function_objects': False, 'fuzzy': False, 'eager': False, 'resolve_at_most': 25, 'cache_for': ['pandas', 'numpy', 'tensorflow', 'matplotlib']}, 'ruff': {'enabled': True, 'config': None, 'exclude': None, 'executable': 'ruff', 'ignore': None, 'lineLength': None, 'perFileIgnores': None, 'select': None}, 'rope_completion': {'enabled': False, 'eager': False}, 'preload': {'modules': ['os', 'audioop', 'binascii', 'marshal', 'imageop', 'datetime', 'scipy', 'statsmodels', 'PIL', 'skimage', 'wx', 'itertools', 'zlib', 'mpmath', 'cStringIO', 'msvcrt', 'array', 'signal', 'thread', 'xxsubtype', 'sklearn', 'cPickle', 'networkx', 'exceptions', 'parser', 'os.path', 'pandas', 'errno', 'nt', 'nose', 'math', 'sympy', 'imp', 'OpenGL', 'operator', 'collections', 'time', 'zipimport', 'sys', 'gc', 'rgbimg', 'cmath', 'matplotlib', 'numpy', 'mmap', 'strop'], 'enabled': True}, 'mccabe': {'threshold': 15, 'enabled': True}, 'jedi_hover': {'enabled': True}, 'jedi_references': {'enabled': True}, 'rope_autoimport': {'enabled': False, 'memory': False}, 'jedi_symbols': {'enabled': True, 'all_scopes': True, 'include_import_symbols': True}, 'pyflakes': {'enabled': False}, 'autopep8': {'enabled': True}, 'jedi_definition': {'enabled': True, 'follow_imports': True, 'follow_builtin_imports': True, 'follow_builtin_definitions': True}}}
2023-01-07 00:59:48,195 JST - INFO - pylsp.config.config - Disabled plugins: [None, None, None, None, <module 'pylsp.plugins.pylint_lint' from '/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/plugins/pylint_lint.py'>]
2023-01-07 00:59:48,196 JST - DEBUG - pylsp_jsonrpc.endpoint - Handling notification from client {'jsonrpc': '2.0', 'method': 'textDocument/didOpen', 'params': {'textDocument': {'uri': 'file:///Users/yaegassy/dummy_proj/sample.py', 'languageId': 'python', 'version': 1, 'text': 'import sys\n'}}}
2023-01-07 00:59:48,196 JST - DEBUG - pylsp.config.config - pylsp_document_did_open [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: file:///Users/yaegassy/dummy_proj/sample.py
2023-01-07 00:59:48,196 JST - DEBUG - pylsp.config.config - finish pylsp_document_did_open --> [] [hook]
2023-01-07 00:59:48,237 JST - DEBUG - pylsp_jsonrpc.endpoint - Handling request from client {'jsonrpc': '2.0', 'id': 1, 'method': 'textDocument/codeLens', 'params': {'textDocument': {'uri': 'file:///Users/yaegassy/dummy_proj/sample.py'}}}
2023-01-07 00:59:48,238 JST - DEBUG - pylsp.config.config - pylsp_code_lens [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: file:///Users/yaegassy/dummy_proj/sample.py
2023-01-07 00:59:48,238 JST - DEBUG - pylsp.config.config - finish pylsp_code_lens --> [] [hook]
2023-01-07 00:59:48,238 JST - DEBUG - pylsp_jsonrpc.endpoint - Got result from synchronous request handler: []
2023-01-07 00:59:48,702 JST - DEBUG - pylsp.config.config - pylsp_lint [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: file:///Users/yaegassy/dummy_proj/sample.py
is_saved: True
2023-01-07 00:59:48,702 JST - DEBUG - pylsp_jsonrpc.endpoint - Sending notification: $/progress {'token': 'b554765d-096d-4f86-b77b-0e568350515b', 'value': {'kind': 'begin', 'title': 'lint: flake8'}}
2023-01-07 00:59:48,702 JST - DEBUG - pylsp.config.config - With configuration: {'connectionMode': 'stdio', 'trace': {'server': 'off'}, 'enable': True, 'commandPath': '/Users/yaegassy/ls/pylsp/venv/bin/pylsp', 'tcpPort': '2087', 'configurationSources': ['pycodestyle'], 'builtin': {'pythonPath': '', 'installExtrasArgs': ['flake8', 'mccabe', 'pycodestyle', 'pydocstyle', 'pyflakes', 'pylint', 'rope'], 'enableInstallPylspMypy': True, 'enableInstallPylsIsort': True, 'enableInstallPythonLspBlack': True, 'enableInstallPylspRope': True, 'pylspMypyVersion': '', 'pylsIsortVersion': '', 'pythonLspBlackVersion': '', 'pylspRopeVersion': ''}, 'rope': {'extensionModules': ['OpenGL', 'PIL', 'array', 'audioop', 'binascii', 'cPickle', 'cStringIO', 'cmath', 'collections', 'datetime', 'errno', 'exceptions', 'gc', 'imageop', 'imp', 'itertools', 'marshal', 'math', 'matplotlib', 'mmap', 'mpmath', 'msvcrt', 'networkx', 'nose', 'nt', 'numpy', 'operator', 'os', 'os.path', 'pandas', 'parser', 'rgbimg', 'scipy', 'signal', 'skimage', 'sklearn', 'statsmodels', 'strop', 'sympy', 'sys', 'thread', 'time', 'wx', 'xxsubtype', 'zipimport', 'zlib']}, 'tcpHost': '127.0.0.1', 'plugins': {'pycodestyle': {'filename': [], 'ignore': [], 'exclude': [], 'enabled': True}, 'pylint': {'args': [], 'executable': None, 'enabled': False}, 'jedi_signature_help': {'enabled': True}, 'pydocstyle': {'enabled': False, 'convention': None, 'addIgnore': [], 'addSelect': [], 'ignore': [], 'select': None, 'match': '(?!test_).*\\.py', 'matchDir': '[^\\.].*'}, 'yapf': {'enabled': True}, 'flake8': {'ignore': [], 'perFileIgnores': [], 'exclude': [], 'executable': 'flake8', 'enabled': True}, 'jedi': {'auto_import_modules': ['numpy'], 'extra_paths': [], 'env_vars': None, 'environment': None}, 'jedi_completion': {'enabled': True, 'include_params': True, 'include_class_objects': False, 'include_function_objects': False, 'fuzzy': False, 'eager': False, 'resolve_at_most': 25, 'cache_for': ['pandas', 'numpy', 'tensorflow', 'matplotlib']}, 'ruff': {'enabled': True, 'config': None, 'exclude': None, 'executable': 'ruff', 'ignore': None, 'lineLength': None, 'perFileIgnores': None, 'select': None}, 'rope_completion': {'enabled': False, 'eager': False}, 'preload': {'modules': ['os', 'audioop', 'binascii', 'marshal', 'imageop', 'datetime', 'scipy', 'statsmodels', 'PIL', 'skimage', 'wx', 'itertools', 'zlib', 'mpmath', 'cStringIO', 'msvcrt', 'array', 'signal', 'thread', 'xxsubtype', 'sklearn', 'cPickle', 'networkx', 'exceptions', 'parser', 'os.path', 'pandas', 'errno', 'nt', 'nose', 'math', 'sympy', 'imp', 'OpenGL', 'operator', 'collections', 'time', 'zipimport', 'sys', 'gc', 'rgbimg', 'cmath', 'matplotlib', 'numpy', 'mmap', 'strop'], 'enabled': True}, 'mccabe': {'threshold': 15, 'enabled': True}, 'jedi_hover': {'enabled': True}, 'jedi_references': {'enabled': True}, 'rope_autoimport': {'enabled': False, 'memory': False}, 'jedi_symbols': {'enabled': True, 'all_scopes': True, 'include_import_symbols': True}, 'pyflakes': {'enabled': False}, 'autopep8': {'enabled': True}, 'jedi_definition': {'enabled': True, 'follow_imports': True, 'follow_builtin_imports': True, 'follow_builtin_definitions': True}}}
2023-01-07 00:59:48,703 JST - DEBUG - pylsp.plugins.flake8_lint - Got flake8 settings: {'ignore': [], 'perFileIgnores': [], 'exclude': [], 'executable': 'flake8', 'enabled': True}
2023-01-07 00:59:48,703 JST - DEBUG - pylsp.plugins.flake8_lint - Calling flake8 with args: '['-', '--exclude=', '--stdin-display-name', 'sample.py']'
2023-01-07 00:59:48,794 JST - DEBUG - pylsp_jsonrpc.endpoint - Sending notification: $/progress {'token': 'b554765d-096d-4f86-b77b-0e568350515b', 'value': {'kind': 'end'}}
2023-01-07 00:59:48,794 JST - DEBUG - pylsp_ruff.ruff_lint - Got ruff settings: {'enabled': True, 'config': None, 'exclude': None, 'executable': 'ruff', 'ignore': None, 'lineLength': None, 'perFileIgnores': None, 'select': None}
2023-01-07 00:59:48,794 JST - DEBUG - pylsp_ruff.ruff_lint - Calling ruff with args: ['--quiet', '--format=json', '--no-fix', '--force-exclude', '--stdin-filename', '/Users/yaegassy/dummy_proj/sample.py', '--', '-'] on '/Users/yaegassy/dummy_proj/sample.py'
2023-01-07 00:59:48,797 JST - WARNING - pylsp.config.config - Failed to load hook pylsp_lint: [Errno 2] No such file or directory: 'ruff'
Traceback (most recent call last):
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp/config/config.py", line 33, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pluggy/_manager.py", line 327, in traced_hookexec
return outcome.get_result()
^^^^^^^^^^^^^^^^^^^^
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pluggy/_result.py", line 33, in from_call
result = func()
^^^^^^
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pluggy/_manager.py", line 324, in <lambda>
lambda: oldcall(hook_name, hook_impls, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pluggy/_callers.py", line 60, in _multicall
return outcome.get_result()
^^^^^^^^^^^^^^^^^^^^
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp_ruff/ruff_lint.py", line 68, in pylsp_lint
output = run_ruff_lint(ruff_executable, document, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yaegassy/ls/pylsp/venv/lib/python3.11/site-packages/pylsp_ruff/ruff_lint.py", line 93, in run_ruff_lint
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1024, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1901, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ruff'
2023-01-07 00:59:48,798 JST - DEBUG - pylsp_jsonrpc.endpoint - Sending notification: textDocument/publishDiagnostics {'uri': 'file:///Users/yaegassy/dummy_proj/sample.py', 'diagnostics': []}
2023-01-07 00:59:48,897 JST - DEBUG - pylsp_jsonrpc.endpoint - Handling request from client {'jsonrpc': '2.0', 'id': 2, 'method': 'textDocument/codeLens', 'params': {'textDocument': {'uri': 'file:///Users/yaegassy/dummy_proj/sample.py'}}}
2023-01-07 00:59:48,897 JST - DEBUG - pylsp.config.config - pylsp_code_lens [hook]
config: <pylsp.config.config.Config object at 0x104b0ae50>
workspace: <pylsp.workspace.Workspace object at 0x1049bf690>
document: file:///Users/yaegassy/dummy_proj/sample.py
2023-01-07 00:59:48,897 JST - DEBUG - pylsp.config.config - finish pylsp_code_lens --> [] [hook]
2023-01-07 00:59:48,897 JST - DEBUG - pylsp_jsonrpc.endpoint - Got result from synchronous request handler: []
Alright, looks like SubProcessError does not catch the FileNotFoundError, I'll push a fix.
Fixed with 7ceb7da. Can you check if it works locally? If so, I'll bump the version on pypi.
I decided to make this more general so that any Exception is now caught.
Sorry for the late reply. The issue in this issue has been resolved. This issue is closed.