-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Python Tools server crashed 5 times in the last 3 minutes. The server will not be restarted. #5134
Comments
I was able to find the cause of the error. I discovered that it only happened in a certain project I had, so I went through and tried deleting files to see if they were the cause. And I ended up deleting the content of my python file, and then the server would start. This is the entirety of the file. `print("section .text") myFile = open('input.txt', 'r') line = myFile.readline() myList = line.split(" ") num1 = myList[0] if (len(myList) == 1): This somehow causes the server to crash Edit: It is this line in particular that is causing it. (I went through one by one uncommenting to find the bad line)
|
The newest stable release of the python language server seems to have fixed the bug. Thank you |
Hi sorry to post this here as a comment, but this issue seems to have started up again with the following specs:
This is without any prompting, no real project files to speak of. The .py file I opened which set this off was working fine under Ubuntu 18.10, and is a #%%-delimited jupyter notebook file which I run in the interactive window - highly doubt the file is the cause of the issue. |
@ahnafalrafi you should check out the issue that was opened in reference to this one, because that's where all the work was done to fix the issue. microsoft/python-language-server#909 Check if the error you are getting matches that one, because there are many reasons why the error could occur. If the error is different you should open a new issue. If you go to output, python, you should see what they actual error is. |
@ahnafalrafi If you are seeing this error again, please create a new issue. |
I got this error too. In my case, it is because my python project has a sklearn floder which contains too much training file, and it make python tool crash. So I set |
Ah okay will do - took a look at the output for python, its about libssl |
Expected behaviour
Python file opened, server starts with no crashes. Intellisense works properly
Actual behaviour
Python file opened. Python tools server crashes 5 times within 3 minutes and is not restarted anymore. Intellisense does not work
Steps to reproduce:
Logs
Starting Microsoft Python language server.
[Info - 1:42:18 PM] GetCurrentSearchPaths /usr/bin/python3
[Info - 1:42:18 PM] Python search paths:
[Info - 1:42:18 PM] /usr/lib/python3.6
[Info - 1:42:18 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:18 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:18 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:18 PM] /usr/lib/python3/dist-packages
[Info - 1:42:18 PM] Configuration search paths:
[Info - 1:42:18 PM] /usr/lib/python36.zip
[Info - 1:42:18 PM] /usr/lib/python3.6
[Info - 1:42:18 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:18 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:18 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:18 PM] /usr/lib/python3/dist-packages
[Info - 1:42:18 PM] /usr/bin
[Info - 1:42:19 PM] Microsoft Python Language Server version 0.2.43.0
[Info - 1:42:19 PM] Initializing for /usr/bin/python3
Unhandled Exception: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
at Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.b__22_0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Info - 1:42:20 PM] Connection to server got closed. Server will restart.
##########Linting Output - pylint##########
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
[Info - 1:42:21 PM] GetCurrentSearchPaths /usr/bin/python3
[Info - 1:42:21 PM] Python search paths:
[Info - 1:42:21 PM] /usr/lib/python3.6
[Info - 1:42:21 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:21 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:21 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:21 PM] /usr/lib/python3/dist-packages
[Info - 1:42:21 PM] Configuration search paths:
[Info - 1:42:21 PM] /usr/lib/python36.zip
[Info - 1:42:21 PM] /usr/lib/python3.6
[Info - 1:42:21 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:21 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:21 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:21 PM] /usr/lib/python3/dist-packages
[Info - 1:42:21 PM] /usr/bin
[Info - 1:42:22 PM] Microsoft Python Language Server version 0.2.43.0
[Info - 1:42:22 PM] Initializing for /usr/bin/python3
Unhandled Exception: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
at Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.b__22_0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Info - 1:42:22 PM] Connection to server got closed. Server will restart.
[Info - 1:42:23 PM] GetCurrentSearchPaths /usr/bin/python3
[Info - 1:42:23 PM] Python search paths:
[Info - 1:42:23 PM] /usr/lib/python3.6
[Info - 1:42:23 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:23 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:23 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:23 PM] /usr/lib/python3/dist-packages
[Info - 1:42:23 PM] Configuration search paths:
[Info - 1:42:23 PM] /usr/lib/python36.zip
[Info - 1:42:23 PM] /usr/lib/python3.6
[Info - 1:42:23 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:23 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:23 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:23 PM] /usr/lib/python3/dist-packages
[Info - 1:42:23 PM] /usr/bin
[Info - 1:42:24 PM] Microsoft Python Language Server version 0.2.43.0
[Info - 1:42:24 PM] Initializing for /usr/bin/python3
Unhandled Exception: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
at Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.b__22_0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Info - 1:42:25 PM] Connection to server got closed. Server will restart.
[Info - 1:42:26 PM] GetCurrentSearchPaths /usr/bin/python3
[Info - 1:42:26 PM] Python search paths:
[Info - 1:42:26 PM] /usr/lib/python3.6
[Info - 1:42:26 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:26 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:26 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:26 PM] /usr/lib/python3/dist-packages
[Info - 1:42:26 PM] Configuration search paths:
[Info - 1:42:26 PM] /usr/lib/python36.zip
[Info - 1:42:26 PM] /usr/lib/python3.6
[Info - 1:42:26 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:26 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:26 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:26 PM] /usr/lib/python3/dist-packages
[Info - 1:42:26 PM] /usr/bin
[Info - 1:42:26 PM] Microsoft Python Language Server version 0.2.43.0
[Info - 1:42:26 PM] Initializing for /usr/bin/python3
Unhandled Exception: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
at Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.b__22_0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Info - 1:42:27 PM] Connection to server got closed. Server will restart.
[Info - 1:42:28 PM] GetCurrentSearchPaths /usr/bin/python3
[Info - 1:42:28 PM] Python search paths:
[Info - 1:42:28 PM] /usr/lib/python3.6
[Info - 1:42:28 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:28 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:28 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:28 PM] /usr/lib/python3/dist-packages
[Info - 1:42:28 PM] Configuration search paths:
[Info - 1:42:28 PM] /usr/lib/python36.zip
[Info - 1:42:28 PM] /usr/lib/python3.6
[Info - 1:42:28 PM] /usr/lib/python3.6/lib-dynload
[Info - 1:42:28 PM] /home/chris/.local/lib/python3.6/site-packages
[Info - 1:42:28 PM] /usr/local/lib/python3.6/dist-packages
[Info - 1:42:28 PM] /usr/lib/python3/dist-packages
[Info - 1:42:28 PM] /usr/bin
[Info - 1:42:29 PM] Microsoft Python Language Server version 0.2.43.0
[Info - 1:42:29 PM] Initializing for /usr/bin/python3
Unhandled Exception: System.ObjectDisposedException: The CancellationTokenSource has been disposed.
at System.Threading.CancellationTokenSource.ThrowObjectDisposedException()
at Microsoft.Python.Analysis.Analyzer.PythonAnalyzerSession.b__22_0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
[Error - 1:42:29 PM] Connection to server got closed. Server will not be restarted.
##########Linting Output - pylint##########
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: