0

I was working along in Python in Visual Studio code 1.73.1 on my Mac (OS 11.6, Python 3.9), and after successfully starting a debug session more than 30 times, suddenly it wouldn't. I tried several times. Shortly I noticed this message: "the isort server has crashed 3 times in 5 minutes. It will not be restarted." Clicking through, I discovered the existence of the isort extension and began trying solutions:

  1. Turn off the isort extension. Result: the little horizontal progress line in the upper left corner moves for about half a second and then vanishes. No command appears in the terminal. The same result follows the next several steps:
  2. Delete the extension.
  3. Replace it with a competing isort from someone else.
  4. Replace the Python extension with a more trusted version as described here: https://learn.microsoft.com/en-us/answers/questions/724858/vscode-debugger-not-working-for-python.html
  5. Uninstall and re-download Visual Studio code.

At last I really went all the way: Trash the application and empty the trash. Delete all relevant files as listed here [https://stackoverflow.com/questions/42603103/how-to-completely-uninstall-vs-code-on-mac] :

rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist 
rm -fr ~/Library/Preferences/com.microsoft.VSCode.plist 
rm -fr ~/Library/Caches/com.microsoft.VSCode
rm -fr ~/Library/Caches/com.microsoft.VSCode.ShipIt/
rm -fr ~/Library/Application\ Support/Code/
rm -fr ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/
rm -fr ~/.vscode/

Reinstall Visual Studio code. This got me back to the place where, while failing to start a debug session, it said "the isort server has crashed 3 times in 5 minutes. It will not be restarted." (How do you clear that flag so that it will try again, anyway?)

It would seem that VSCode debugging has been wrecked by an automatic update to something else that is not actually part of VSCode. Has anyone seen this? Is this a known problem that could be fixed by installing a different version of something?

Logs that may be related to the isort problem:

  1. tail of 1-Python.log:

    /usr/lib/python2.7 ~/.vscode/extensions/ms-python.python-2022.19.13251009/pythonFiles/get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.19.13251009/pythonFiles/interpreterInfo.py [ERROR 2022-11-2 10:16:36.608]: [Error: Command failed: /usr/lib/python2.7 /Users/ken/.vscode/extensions/ms-python.python-2022.19.13251009/pythonFiles/get_output_via_markers.py /Users/ken/.vscode/extensions/ms-python.python-2022.19.13251009/pythonFiles/interpreterInfo.py /bin/sh: /usr/lib/python2.7: is a directory

     at ChildProcess.exithandler (node:child_process:408:12)
     at ChildProcess.emit (node:events:526:28)
     at maybeClose (node:internal/child_process:1092:16)
     at ChildProcess._handle.onexit (node:internal/child_process:302:5)] {
    

    killed: false, code: 126, signal: null, cmd: '/usr/lib/python2.7 /Users/ken/.vscode/extensions/ms-python.python-2022.19.13251009/pythonFiles/get_output_via_markers.py /Users/ken/.vscode/extensions/ms-python.python-2022.19.13251009/pythonFiles/interpreterInfo.py' } Starting Pylance language server.

  2. tail of 4-isort.log (this block of text repeated several times):

    Traceback (most recent call last): File "/Users/ken/.vscode/extensions/ms-python.isort-2022.8.0/bundled/tool/server.py", line 744, in LSP_SERVER.start_io() File "/Users/ken/.vscode/extensions/ms-python.isort-2022.8.0/bundled/libs/pygls/server.py", line 226, in start_io self.loop.run_until_complete( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/Users/ken/.vscode/extensions/ms-python.isort-2022.8.0/bundled/libs/pygls/server.py", line 57, in aio_readline header = await loop.run_in_executor(executor, rfile.readline) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 814, in run_in_executor executor.submit(func, *args), loop=self) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py", line 170, in submit self._adjust_thread_count() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py", line 193, in _adjust_thread_count t.start() TypeError: start() missing 1 required positional argument: 'sessionID' Error in atexit._run_exitfuncs: TypeError: stop_all_processes() missing 1 required positional argument: 'self' [Error - 10:10:30 AM] Connection to server got closed. Server will not be restarted.

Joymaker
  • 813
  • 1
  • 9
  • 23

0 Answers0