microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.29k stars 290 forks source link

Interactive window cannot connect to remote jupyter while notebook editor succeeds #898

Closed tbenst closed 3 years ago

tbenst commented 4 years ago

Steps to cause the bug to occur

  1. ssh to remote computer with ssh -L 8888:localhost:8888 myserver
  2. on remote start jupyter, jupyter notebook
  3. On local, open .py file in VSCode
  4. ctrl-shift-p -> Python: Select local or remote Jupyter server for connections -> Existing
  5. input http://localhost:8888/?token=d1f20c984dbaa64b8439c2650b18793bd9d5cfc029150000 or similar for remote
  6. observe that running a cell fails with:
    Failed to connect to remote Jupyter notebook.
    Check that the Jupyter Server URI setting has a valid running server specified. 
    https://hostname:8080/ TypeError: request to https://hostname:8080/api/contents/?1594362020681 failed,
    reason: getaddrinfo EBUSY hostname

Note that this exact procedure succeeds if you open an .ipynb file instead!

Your Jupyter and/or Python environment

Developer Tools Console Output

[Extension Host] Info Python Extension: 2020-07-09 23:30:33: Loading web panel. Panel is set
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Wait for sys info for 8f62fb00-faa9-4af8-ab07-a79fa651552c 0
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Submitting code for 8f62fb00-faa9-4af8-ab07-a79fa651552c
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Loading web panel. Panel is set
2console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Wait for sys info for 8f62fb00-faa9-4af8-ab07-a79fa651552c 0
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Adding hash for 3 = 43bc95b048b1 with 1 lines
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Kernel switching to busy
webviewElement.ts:241 [Embedded Page] Posting message send_info to extension.
webviewElement.ts:241 [Embedded Page] Posting message update_model to extension.
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-07-09 23:30:33: Finished execution for a9e450de-4d22-43f0-9807-59cf5141bb7c

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

greazer commented 4 years ago

@tbenst, It looks like you may have been accidentally been entering the correct URI in the interactive case? It appears that "https://hostname" may have been entered by mistake.

tbenst commented 4 years ago

@greazer no, I am pasting the same value in both cases

rchiodo commented 4 years ago

@tbenst can you check this setting:

python.dataScience.jupyterServerUri

It should point to the URI you want. The 'Select local or remote Jupyter server for connections' just sets this setting.

rchiodo commented 4 years ago

Your error output is indicating it wasn't set.

tbenst commented 4 years ago

@rchiodo the setting is set correctly. It fails when I try running a cell in the .py file. But as soon as I try running a cell in a .ipynb file, connection succeeds, and I can subsequently run cells in a .py file.

rchiodo commented 4 years ago

What is the failure that it generates?

tbenst commented 4 years ago

@rchiodo I documented the failure in my original post, including the popup in bottom right corner + developer tools console. Please let me know if I can provide additional info that would be helpful. Thanks for your help!

tbenst commented 4 years ago

Peek-vscode-jupyter-wont-start

rchiodo commented 4 years ago

Can you upload the entire developer tools console? The console output you uploaded looks to be just the last cell running.

The error message you originally posted:

Failed to connect to remote Jupyter notebook.
Check that the Jupyter Server URI setting has a valid running server specified. 
https://hostname:8080/ TypeError: request to https://hostname:8080/api/contents/?1594362020681 failed,
reason: getaddrinfo EBUSY hostname

Did you change it all? https://hostname:8080 would not work, but maybe you changed it to protect your host name. If you didn't change it looks like the default value we use as an example for the specify server command.

tbenst commented 4 years ago

@rchiodo I did not change the messages at all. Here are the full logs. Note that I run a cell in the second notebook at 2020-07-15 08:04:53.

Developer console log...

``` [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Waiting for jupyter server and web panel ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Loading web panel. Panel is notset console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Loading web view... console.ts:137 [Extension Host] Warn Python Extension: 2020-07-15 08:04:42: startHttpServer=false, will not be used. Temporarily turned off t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:398 _invokeHandler @ rpcProtocol.ts:383 _receiveRequest @ rpcProtocol.ts:299 _receiveOneMessage @ rpcProtocol.ts:226 (anonymous) @ rpcProtocol.ts:101 fire @ event.ts:582 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:582 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:200 addChunk @ _stream_readable.js:294 readableAddChunk @ _stream_readable.js:275 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Web view created. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Getting jupyter server options ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Connecting to jupyter server ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Connecting to history server console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Cached data exists getEnvironmentVariables, console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Connecting to process for history server console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Connecting server 412e8f0b-684f-4a3e-a21c-df8d3ffc1859 kernelSpec 63311c40-9451-4cff-85b8-7a90af37df14 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Shutdown session -- complete console.ts:137 [Extension Host] Error Python Extension: 2020-07-15 08:04:42: Failed to connect to server [S [Error]: Invalid response: 500 Internal Server Error at /home/tyler/.vscode/extensions/ms-python.python-2020.3.71113/out/client/node_modules/@jupyterlab/services.js:3:553612 at async t.SessionManager.startNew (/home/tyler/.vscode/extensions/ms-python.python-2020.3.71113/out/client/node_modules/@jupyterlab/services.js:3:545135)] t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:398 _invokeHandler @ rpcProtocol.ts:383 _receiveRequest @ rpcProtocol.ts:299 _receiveOneMessage @ rpcProtocol.ts:226 (anonymous) @ rpcProtocol.ts:101 fire @ event.ts:582 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:582 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:200 addChunk @ _stream_readable.js:294 readableAddChunk @ _stream_readable.js:275 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Killing server because of error Error: Invalid response: 500 Internal Server Error console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Shutting down notebooks for 412e8f0b-684f-4a3e-a21c-df8d3ffc1859 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Shut down session manager console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: SessionManager - dispose contents manager console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: ShutdownSessionAndConnection - dispose session manager console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:42: Shutdown server - dispose conn info notificationsAlerts.ts:40 Failed to connect to remote Jupyter notebook. Check that the Jupyter Server URI setting has a valid running server specified. http://localhost:8880/ Error: Invalid response: 500 Internal Server Error onDidNotificationChange @ notificationsAlerts.ts:40 (anonymous) @ notificationsAlerts.ts:26 fire @ event.ts:582 addNotification @ notifications.ts:171 notify @ notificationService.ts:101 (anonymous) @ mainThreadMessageService.ts:83 _showMessage @ mainThreadMessageService.ts:44 $showMessage @ mainThreadMessageService.ts:38 _doInvokeHandler @ rpcProtocol.ts:398 _invokeHandler @ rpcProtocol.ts:383 _receiveRequest @ rpcProtocol.ts:299 _receiveOneMessage @ rpcProtocol.ts:226 (anonymous) @ rpcProtocol.ts:101 fire @ event.ts:582 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:582 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:200 addChunk @ _stream_readable.js:294 readableAddChunk @ _stream_readable.js:275 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Error Python Extension: 2020-07-15 08:04:42: DataScience Error [Error: Failed to connect to remote Jupyter notebook. Check that the Jupyter Server URI setting has a valid running server specified. http://localhost:8880/ Error: Invalid response: 500 Internal Server Error at /home/tyler/.vscode/extensions/ms-python.python-2020.3.71113/out/client/extension.js:1:814820] t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:398 _invokeHandler @ rpcProtocol.ts:383 _receiveRequest @ rpcProtocol.ts:299 _receiveOneMessage @ rpcProtocol.ts:226 (anonymous) @ rpcProtocol.ts:101 fire @ event.ts:582 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:582 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:200 addChunk @ _stream_readable.js:294 readableAddChunk @ _stream_readable.js:275 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 4console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:53: Cached data exists getEnvironmentVariables, /home/tyler/temp 2console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:53: Loading web panel. Panel is notset console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:53: Loading web view... console.ts:137 [Extension Host] Warn Python Extension: 2020-07-15 08:04:53: startHttpServer=false, will not be used. Temporarily turned off t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:398 _invokeHandler @ rpcProtocol.ts:383 _receiveRequest @ rpcProtocol.ts:299 _receiveOneMessage @ rpcProtocol.ts:226 (anonymous) @ rpcProtocol.ts:101 fire @ event.ts:582 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:582 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:200 addChunk @ _stream_readable.js:294 readableAddChunk @ _stream_readable.js:275 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:53: Loading web view... console.ts:137 [Extension Host] Warn Python Extension: 2020-07-15 08:04:53: startHttpServer=false, will not be used. Temporarily turned off t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:398 _invokeHandler @ rpcProtocol.ts:383 _receiveRequest @ rpcProtocol.ts:299 _receiveOneMessage @ rpcProtocol.ts:226 (anonymous) @ rpcProtocol.ts:101 fire @ event.ts:582 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:582 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:200 addChunk @ _stream_readable.js:294 readableAddChunk @ _stream_readable.js:275 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 2console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:53: Web view created. 6console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:53: Attempting to start a server because of preload conditions ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: getActivatedEnvironmentVariables, Class name = C, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: {"architecture":3,"path":"/home/tyler/lib/anaconda3/bin/python","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.7.3-final","major":3,"minor":7,"patch":3,"prerelease":["final"],"build":[],"version":"3.7.3-final"},"sysPrefix":"/home/tyler/lib/anaconda3","fileHash":"af76cba233bae1529116d9dafd02540996ea74d0cd7eceec1dd47c8d9d4a2bcdcf1c3079b788d6bcdffd3daca90992ceecd39d6c08c8cc0cc8ee942886947d4f","companyDisplayName":"Anaconda, Inc.","type":"Conda","envPath":"/home/tyler/lib/anaconda3","envName":"base","cachedEntry":true,"displayName":"Python 3.7.3 64-bit ('base': conda)","__store":true}, Arg 3: true console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: getActivatedEnvironmentVariables, Class name = C, completed in 1ms, has a truthy return value, Arg 1: undefined, Arg 2: {"architecture":3,"path":"/home/tyler/lib/anaconda3/bin/python","version":{"options":{"loose":false,"includePrerelease":false},"loose":false,"raw":"3.7.3-final","major":3,"minor":7,"patch":3,"prerelease":["final"],"build":[],"version":"3.7.3-final"},"sysPrefix":"/home/tyler/lib/anaconda3","fileHash":"af76cba233bae1529116d9dafd02540996ea74d0cd7eceec1dd47c8d9d4a2bcdcf1c3079b788d6bcdffd3daca90992ceecd39d6c08c8cc0cc8ee942886947d4f","companyDisplayName":"Anaconda, Inc.","type":"Conda","envPath":"/home/tyler/lib/anaconda3","envName":"base","cachedEntry":true,"displayName":"Python 3.7.3 64-bit ('base': conda)","__store":true}, Arg 3: true 3console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: > ~/lib/anaconda3/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v webviewElement.ts:241 [Embedded Page] Posting message started to extension. webviewElement.ts:241 [Embedded Page] Posting message get_css_request to extension. webviewElement.ts:241 [Embedded Page] Posting message get_monaco_theme_request to extension. webviewElement.ts:241 [Embedded Page] Posting message load_onigasm_assembly_request to extension. webviewElement.ts:241 [Embedded Page] Posting message load_tmlanguage_request to extension. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Web view react rendered console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Request for onigasm file at /home/tyler/.vscode/extensions/ms-python.python-2020.3.71113/out/client/node_modules/onigasm/lib/onigasm.wasm console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Request for tmlanguage file. webviewElement.ts:241 [Embedded Page] Posting message get_css_request to extension. webviewElement.ts:241 [Embedded Page] Posting message get_monaco_theme_request to extension. webviewElement.ts:241 [Embedded Page] Posting message send_info to extension. webviewElement.ts:241 [Embedded Page] Posting message load_all_cells_complete to extension. webviewElement.ts:241 [Embedded Page] Posting message started to extension. webviewElement.ts:241 [Embedded Page] Posting message get_css_request to extension. webviewElement.ts:241 [Embedded Page] Posting message get_monaco_theme_request to extension. webviewElement.ts:241 [Embedded Page] Posting message load_onigasm_assembly_request to extension. webviewElement.ts:241 [Embedded Page] Posting message load_tmlanguage_request to extension. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Cached data exists getEnvironmentVariables, /home/tyler/temp/Untitled.ipynb console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Web view react rendered console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Request for onigasm file at /home/tyler/.vscode/extensions/ms-python.python-2020.3.71113/out/client/node_modules/onigasm/lib/onigasm.wasm console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Request for tmlanguage file. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:54: Attempting search for colors ... webviewElement.ts:241 [Embedded Page] Posting message get_css_request to extension. webviewElement.ts:241 [Embedded Page] Posting message get_monaco_theme_request to extension. webviewElement.ts:241 [Embedded Page] Posting message send_info to extension. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:55: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:55: Attempting search for colors ... webviewElement.ts:241 [Embedded Page] Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq webviewElement.ts:241 [Embedded Page] Failed to construct 'Worker': Script at 'vscode-resource://file///home/tyler/temp/editor.worker.js' cannot be accessed from origin 'null'. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... 4console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Searching for token colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Using colors to generate CSS ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Using colors to generate CSS ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... 3console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Using colors to generate CSS ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Attempting search for colors ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Loading base colors from /home/tyler/.vscode/extensions/zhuangtongfa.material-theme/themes/OneDark-Pro.json ... 3console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:04:56: Using colors to generate CSS ... webviewElement.ts:241 [Embedded Page] Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq webviewElement.ts:241 [Embedded Page] Failed to construct 'Worker': Script at 'vscode-resource://file///home/tyler/temp/editor.worker.js' cannot be accessed from origin 'null'. webviewElement.ts:241 [Embedded Page] Posting message send_info to extension. webviewElement.ts:241 [Embedded Page] Posting message reexecute_cells to extension. webviewElement.ts:241 [Embedded Page] Posting message native_command to extension. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:02: Executing cell NotebookImport#0 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:02: Waiting for jupyter server and web panel ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:02: Getting jupyter server options ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:02: Connecting to jupyter server ... console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:02: Connecting to history server console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:02: Cached data exists getEnvironmentVariables, console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Connecting to process for history server console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Connecting server d1e470ca-76f6-436f-bddd-043b967ad1a9 kernelSpec python3 console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8880/api/kernels/e5cd0fca-9233-4de7-8504-b8ef35f2c8e0 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle on (kernel): e5cd0fca-9233-4de7-8504-b8ef35f2c8e0 -> unknown console.ts:137 [Extension Host] Kernel: connected (e5cd0fca-9233-4de7-8504-b8ef35f2c8e0) console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Finished waiting for idle on (kernel): e5cd0fca-9233-4de7-8504-b8ef35f2c8e0 -> idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Connection complete for history server console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Connected to jupyter server. console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Cached data exists getEnvironmentVariables, /home/tyler/temp/Untitled.ipynb console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Cached data exists getEnvironmentVariables, /home/tyler/temp/test.py 3console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Cached data exists getEnvironmentVariables, /home/tyler/temp/Untitled.ipynb console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Started session d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle (session) d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle on (kernel): e5cd0fca-9233-4de7-8504-b8ef35f2c8e0 -> idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Finished waiting for idle on (kernel): e5cd0fca-9233-4de7-8504-b8ef35f2c8e0 -> idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Initialize config for plots for file:///home/tyler/temp/Untitled.ipynb console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8880/api/kernels/bfc198a3-b38b-4dc7-94b2-3dfc95fd1459 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Started session d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle (session) d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle on (kernel): bfc198a3-b38b-4dc7-94b2-3dfc95fd1459 -> unknown console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Kernel switching to busy console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Kernel switching to idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Initial setup complete for file:///home/tyler/temp/Untitled.ipynb console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Finished connecting d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Submitting code for d571aef4-9491-4d8a-b63e-53b44c2e4d4c console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8880/api/kernels/6ec2eff3-e9a5-4ea5-8b3a-ae8b2f7604d7 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Started session d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle (session) d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle on (kernel): 6ec2eff3-e9a5-4ea5-8b3a-ae8b2f7604d7 -> unknown console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Kernel switching to busy console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Kernel switching to idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Finished execution for NotebookImport#0 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Finished executing cell NotebookImport#0 console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8880/api/kernels/214871d1-422d-48c7-a8fa-60741a46fed3 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:03: Waiting for idle on (kernel): 214871d1-422d-48c7-a8fa-60741a46fed3 -> unknown console.ts:137 [Extension Host] Kernel: connected (bfc198a3-b38b-4dc7-94b2-3dfc95fd1459) console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Finished waiting for idle on (kernel): bfc198a3-b38b-4dc7-94b2-3dfc95fd1459 -> idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Initialize config for plots for history://ec155b3b-dc18-49dc-9e99-9a948aa2f27b console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Kernel switching to busy console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Kernel switching to idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Initial setup complete for history://ec155b3b-dc18-49dc-9e99-9a948aa2f27b console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Finished connecting d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Kernel: connected (6ec2eff3-e9a5-4ea5-8b3a-ae8b2f7604d7) console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8880/api/kernels/d2763be2-1aef-4eb2-ab24-dcd2e5a65951 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Waiting for idle on (kernel): d2763be2-1aef-4eb2-ab24-dcd2e5a65951 -> unknown console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Finished waiting for idle on (kernel): 6ec2eff3-e9a5-4ea5-8b3a-ae8b2f7604d7 -> idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Initialize config for plots for file:///home/tyler/temp/Untitled.ipynb console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Kernel switching to busy console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Kernel switching to idle console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Initial setup complete for file:///home/tyler/temp/Untitled.ipynb console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Finished connecting d1e470ca-76f6-436f-bddd-043b967ad1a9 console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8880/api/kernels/368fac15-422f-4595-b5b8-3ec57b8a4671 console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Waiting for idle on (kernel): 368fac15-422f-4595-b5b8-3ec57b8a4671 -> unknown console.ts:137 [Extension Host] Kernel: connected (214871d1-422d-48c7-a8fa-60741a46fed3) console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Finished waiting for idle on (kernel): 214871d1-422d-48c7-a8fa-60741a46fed3 -> idle console.ts:137 [Extension Host] Kernel: connected (d2763be2-1aef-4eb2-ab24-dcd2e5a65951) console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Finished waiting for idle on (kernel): d2763be2-1aef-4eb2-ab24-dcd2e5a65951 -> idle console.ts:137 [Extension Host] Kernel: connected (368fac15-422f-4595-b5b8-3ec57b8a4671) console.ts:137 [Extension Host] Info Python Extension: 2020-07-15 08:05:04: Finished waiting for idle on (kernel): 368fac15-422f-4595-b5b8-3ec57b8a4671 -> idle ```

rchiodo commented 4 years ago

Looks like a different error in the log:

http://localhost:8880/ Error: Invalid response: 500 Internal Server Error

Not sure why it would fail on the first attach and work on the second.

Does the output of the jupyter server indicate anything? It should have put out a bunch of messages to stderr where you started it.