Issue Type: Bug
Upon opening any Python file, I see the following two errors in the bottom right corner of VS Code:
(1) Couldn't start client Python Tools
(2) TypeError: expected str, bytes or os.PathLike object, not NoneType
I have tried reinstalling VS Code (incluiding deleting the ~/.vscode folder). With a fresh install, I do not receive this error after first installing the Python extension. However, as soon as I restart VS Code after a fresh install, the error appears again and persists.
I have also tried removing all Pythons from my system except the MacOS default, and the error persists regardless.
Extension version: 2021.3.658691958
VS Code version: Code 1.54.3 (Universal) (2b9aebd5354a3629c3aba0a5f5df49f43d6689f8, 2021-03-15T11:57:12.728Z)
OS version: Darwin arm64 20.3.0
Reviewing the Output log suggests it is an error with the language server:
Error 2021-03-20 10:33:44: Failed to start language server, Class name = r, completed in 205ms, has a falsy return value, Arg 1: Uri:/Users/my_user/Desktop/Untitled-1.py, Arg 2: {"architecture":3,"path":"/Users/my_user/opt/anaconda3/bin/python","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.8.5-final","major":3,"minor":8,"patch":5,"prerelease":["final"],"build":[],"version":"3.8.5-final"},"sysVersion":"3.8.5 (default, Sep 4 2020, 02:22:02) \n[Clang 10.0.0 ]","sysPrefix":"/Users/my_user/opt/anaconda3","fileHash":"014e59ee5fed4418347dbd3d8b14f75a9f26a345d981729b6943bbf8843c8599251c28a9559b92e72644178b52133ab9980c98652120bc860a37d0bb04719842","companyDisplayName":"Anaconda, Inc.","envType":"Conda","envPath":"/Users/my_user/opt/anaconda3","envName":"base","displayName":"Python 3.8.5 64-bit ('base': conda)"}, Arg 3: , Return Value: undefined [o [Error]: TypeError: expected str, bytes or os.PathLike object, not NoneType
at /Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/out/client/extension.js:61:80455
at /Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/out/client/extension.js:61:80749
at Immediate. (/Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/out/client/extension.js:61:81112)
at processImmediate (internal/timers.js:456:21)] {
code: -32602,
data: {'traceback': [' File "/Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/pygls/protocol.py", line 324, in _handle_request\\n self._execute_request(msg_id, handler, params)\\n', ' File "/Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/pygls/protocol.py", line 249, in _execute_request\\n self._send_response(msg_id, handler(params))\\n', ' File "/Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/pygls/protocol.py", line 56, in decorator\\n ret_val = base_func(self, *args, **kwargs)\\n', ' File "/Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/jedi_language_server/server.py", line 88, in bf_initialize\\n server.project = Project(\\n', ' File "/Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/jedi/api/project.py", line 151, in __init__\\n py2_comp(path, **kwargs)\\n', ' File "/Users/my_user/.vscode/extensions/ms-python.python-2021.3.658691958/pythonFiles/lib/python/jedi/api/project.py", line 141, in py2_comp\\n self._path = os.path.abspath(path)\\n', ' File "/Users/my_user/opt/anaconda3/lib/python3.8/posixpath.py", line 374, in abspath\\n path = os.fspath(path)\\n']}
}
Issue Type: Bug
Upon opening any Python file, I see the following two errors in the bottom right corner of VS Code:
(1) Couldn't start client Python Tools
(2) TypeError: expected str, bytes or os.PathLike object, not NoneType
I have tried reinstalling VS Code (incluiding deleting the ~/.vscode folder). With a fresh install, I do not receive this error after first installing the Python extension. However, as soon as I restart VS Code after a fresh install, the error appears again and persists.
I have also tried removing all Pythons from my system except the MacOS default, and the error persists regardless.
Extension version: 2021.3.658691958
VS Code version: Code 1.54.3 (Universal) (2b9aebd5354a3629c3aba0a5f5df49f43d6689f8, 2021-03-15T11:57:12.728Z)
OS version: Darwin arm64 20.3.0
Reviewing the Output log suggests it is an error with the language server: