I just login to my work vpn after starting the software, I am using cisco any connect as my vpn client. I can not start the software if the VPN is already running.
The error is:
File "C:\PROGRA~1\Anaconda3\lib\site-packages\spyder\plugins\completion\kite\client.py", line 108, in get_status
self.sig_status_response_ready[dict].emit(kite_status)
TypeError: KiteClient.sig_status_response_ready[dict].emit(): argument 1 has unexpected type 'str'
The error happens constantly as long as the software is running but doesn't seem to actually break anything.
@dalthviz, please take a look at this one.
@nsluhrs could you run Spyder from the Anaconda Prompt using the --debug-info verbose
flag, find a request related with the status of the kite service and try access that URL from a browser?
As an example, when I run spyder --debug-info verbose
I can see in the log something like this when opening a file:
2020-04-16 11:48:25,222 [DEBUG] [urllib3.connectionpool] -> http://127.0.0.1:46624 "GET /clientapi/status?filename=C%3A%5CUsers%5CDaniel%5CDesktop%5Cuntitled0.py HTTP/1.1" 200 121
And from that I can try to access the status URL (http://127.0.0.1:46624/clientapi/status?filename=C%3A%5CUsers%5CDaniel%5CDesktop%5Cuntitled0.py
) from the browser:
I think probably the error is caused by a connection error message when trying to access the status URL from localhost while using a VPN. So instead of a JSON
we are getting as a response a string indicating a connection error of some kind.
I think probably the error is caused by a connection error message when trying to access the status URL from localhost while using a VPN. So instead of a JSON we are getting as a response a string indicating a connection error of some kind.
@metalogical, is @dalthviz's hunch in the right direction?
Seems like the most likely scenario. The work VPN is probably misconfigured: 127.0.0.1
should typically not be routed through a VPN.
Sorry for taking so long to respond. I've included everything that I thought might be relevant. I think @metalogical has it right, however I it would be pretty difficult for me to convince the security guys at work to change anything. Would it be possible to change the error handling so it is able to continue after an error like this? Especially since I have explicitly disabled Kite and the software works fine if it encounters the error when already running.
2020-04-20 12:05:42,162 [DEBUG] [spyder.plugins.editor.plugin] -> Start completion server for C:\Users\[removed]\.spyder-py3\temp.py [Python]
2020-04-20 12:05:42,162 [DEBUG] [spyder.plugins.editor.plugin] -> Python completion server is ready
2020-04-20 12:05:42,164 [DEBUG] [spyder.plugins.editor.widgets.codeeditor] -> Completions services available for: C:\Users\[removed]\.spyder-py3\temp.py
2020-04-20 12:05:42,164 [DEBUG] [spyder.plugins.editor.plugin] -> python completion server request: 'textDocument/didOpen'
2020-04-20 12:05:42,165 [DEBUG] [spyder.plugins.completion.plugin] -> Completion plugin: Request 0 Got response from lsp
2020-04-20 12:05:42,165 [DEBUG] [spyder.plugins.completion.plugin] -> Gather responses for textDocument/didOpen
2020-04-20 12:05:42,165 [DEBUG] [spyder.plugins.completion.plugin] -> Completion plugin: Request 0 Got response from kite
2020-04-20 12:05:42,166 [DEBUG] [spyder.plugins.editor.widgets.editor] -> Set focus to: C:\Users\[removed]\.spyder-py3\temp.py
2020-04-20 12:05:42,166 [DEBUG] [spyder.plugins.completion.fallback.actor] -> Got request id 0: textDocument/didOpen for file C:\Users\[removed]\.spyder-py3\temp.py
2020-04-20 12:05:42,167 [DEBUG] [spyder.plugins.editor.widgets.editor] -> Current changed: 0 - C:\Users\[removed]\.spyder-py3\temp.py
2020-04-20 12:05:42,170 [DEBUG] [spyder.plugins.editor.widgets.editor] -> Added thread <spyder.plugins.editor.widgets.editor.AnalysisThread object at 0x0000019B03720A68> to queue
2020-04-20 12:05:42,189 [INFO] [spyder.app.mainwindow] -> Launching code completion client for Python...
2020-04-20 12:05:42,203 [DEBUG] [spyder.plugins.completion.kite.client] -> Starting Kite HTTP session...
2020-04-20 12:05:42,208 [DEBUG] [urllib3.connectionpool] -> Starting new HTTP connection (1): [vpn server name].[company name].com:80
2020-04-20 12:05:42,512 [DEBUG] [urllib3.connectionpool] -> http://[vpn server name].[company name].com:80 "GET http://127.0.0.1:46624/clientapi/languages HTTP/1.1" 200 7277
Traceback (most recent call last):
File "C:\Progra~1\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3718, in main
mainwindow = run_spyder(app, options, args)
File "C:\Progra~1\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3559, in run_spyder
main.setup()
File "C:\Progra~1\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 960, in setup
self.completions.start()
File "C:\Progra~1\Anaconda3\lib\site-packages\spyder\plugins\completion\plugin.py", line 292, in start
client_info['plugin'].start()
File "C:\Progra~1\Anaconda3\lib\site-packages\spyder\plugins\completion\kite\plugin.py", line 144, in start
self.client.start()
File "C:\Progra~1\Anaconda3\lib\site-packages\spyder\plugins\completion\kite\client.py", line 62, in start
self.sig_client_started.emit(self.languages)
TypeError: KiteClient.sig_client_started[list].emit(): argument 1 has unexpected type 'str'
Hi @nsluhrs, thank you for the log. Reopening this to address other possible errors regarding signals
and str
handling
@dalthviz, please open a new issue about the fix @nsluhrs is requesting. This one was already fixed by your PR #12364.