Installed the Pylint extension a few days ago in VS Code, and the next day I got the error below (possibly after some updates to my laptop). I cannot find any information on the web about this error except in the Pylint documentation, which is a little over my head. After the error message, it appears to be sending and receiving responses. I’m not sure what that means; I still see minimal linting in my code, not nearly as much as expected.
I tried updating to the newest version of Python and uninstalling old version, and it didn’t help. Does anyone know how to fix this? I’m using Windows 10 Enterprise 22H2 19045.3448. Thanks
2023-10-16 08:28:41.505 [info] [Trace - 8:28:41 AM] Received notification 'window/logMessage'.
2023-10-16 08:28:41.505 [info] [Error - 8:28:41 AM] Linting failed with error:
Traceback (most recent call last):
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\tool\lsp_server.py", line 122, in _linting_helper
result = _run_tool_on_document(document, use_stdin=True, extra_args=extra_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\tool\lsp_server.py", line 725, in _run_tool_on_document
result = utils.run_module(
^^^^^^^^^^^^^^^^^
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\tool\lsp_utils.py", line 200, in run_module
return _run_module(module, argv, use_stdin, source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\tool\lsp_utils.py", line 185, in _run_module
runpy.run_module(module, run_name="__main__")
File "<frozen runpy>", line 229, in run_module
File "<frozen runpy>", line 88, in _run_code
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\libs\pylint\__main__.py", line 10, in <module>
pylint.run_pylint()
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\libs\pylint\__init__.py", line 34, in run_pylint
PylintRun(argv or sys.argv[1:])
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\libs\pylint\lint\run.py", line 211, in __init__
linter.check(args)
File "c:\Users\username\.vscode\extensions\ms-python.pylint-2023.9.12891007\bundled\libs\pylint\lint\pylinter.py", line 665, in check
raise exceptions.InvalidArgsError(
pylint.exceptions.InvalidArgsError: Missing filename required for --from-stdin
2023-10-16 08:28:41.506 [info] [Trace - 8:28:41 AM] Received notification 'textDocument/publishDiagnostics'.
2023-10-16 08:28:41.506 [info] [Trace - 8:28:41 AM] Received response 'textDocument/codeAction - (1)' in 473ms.
2023-10-16 08:28:41.507 [info] [Trace - 8:28:41 AM] Received response 'textDocument/codeAction - (2)' in 207ms.
2023-10-16 08:28:44.621 [info] [Trace - 8:28:44 AM] Sending request 'textDocument/codeAction - (3)'.
2023-10-16 08:28:44.623 [info] [Trace - 8:28:44 AM] Received response 'textDocument/codeAction - (3)' in 2ms.
Hey Brown are other extensions that you have installed working correctly… if it was after updating Windows then that might be the start of the cause of the problem… was it working correctly before updating Windows
@kyle yes, the Python extension is working correctly, and yes, Pylint was working before installing updates. This is my work computer with updated company software, so it’s a bit of a black box as to what went wrong.
Hi! I have the same issue. I have been working with pylint and vscode without problems, but I noticed that I wasn’t receiving pyling messages and after checking pylint ouput I saw this:
2023-10-26 22:08:52.671 [info] [Error - 10:08:52 PM] Linting failed with error:
Traceback (most recent call last):
File "c:\Users\x-x-x-x\.vscode\extensions\ms-python.pylint-2023.8.1\bundled\tool\lsp_server.py", line 122, in _linting_helper
result = _run_tool_on_document(document, use_stdin=True, extra_args=extra_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\x-x-x-x\.vscode\extensions\ms-python.pylint-2023.8.1\bundled\tool\lsp_server.py", line 725, in _run_tool_on_document
result = utils.run_module(
^^^^^^^^^^^^^^^^^
File "c:\Users\x-x-x-x\.vscode\extensions\ms-python.pylint-2023.8.1\bundled\tool\lsp_utils.py", line 200, in run_module
return _run_module(module, argv, use_stdin, source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\x-x-x-x\.vscode\extensions\ms-python.pylint-2023.8.1\bundled\tool\lsp_utils.py", line 185, in _run_module
runpy.run_module(module, run_name="__main__")
File "<frozen runpy>", line 229, in run_module
File "<frozen runpy>", line 88, in _run_code
File "d:\projects\my_project\.venv\Lib\site-packages\pylint\__main__.py", line 10, in <module>
pylint.run_pylint()
File "d:\projects\my_project\.venv\Lib\site-packages\pylint\__init__.py", line 36, in run_pylint
PylintRun(argv or sys.argv[1:])
File "d:\projects\my_project\.venv\Lib\site-packages\pylint\lint\run.py", line 215, in __init__
linter.check(args)
File "d:\projects\my_project\.venv\Lib\site-packages\pylint\lint\pylinter.py", line 679, in check
raise exceptions.InvalidArgsError(
pylint.exceptions.InvalidArgsError: Missing filename required for --from-stdin
I had the same problem, found out that setting “pylint.args” was corrupted (I’ve initially edited it via gui editor so I think there’s a bug in ms-python.pylint extension).
That fixed the problem for me. If that isn’t the case for you, paste the linting-related settings from settings.json (or the whole file), maybe we’ll find another cause. To open settings.json press F1, type “settings” and select user or workspace settings with “(JSON)”.