Can't start Python interactive viewer for Jupyter cell
See original GitHub issueEnvironment data
- VS Code version: 1.29.0
- Extension version (available under the Extensions sidebar): 2018.10.1 (09 Nov 2018)
- OS and version: Windows 10
- Python version (& distribution if applicable, e.g. Anaconda): 3.7 Anaconda
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Relevant/affected Python packages and their versions: Jupyter notebook
Actual behavior
Try to execute cell in imported python notebook. Python interactive doesn’t start and freezes.
Expected behavior
The selected cell should have been executed in the Python Interactive pane.
Steps to reproduce:
-
Open VSCode from an activated conda env in a dos shell
-
Right click a .ipynb file and select “Import Jupyter Notebook”
-
In the first code cell of the imported file file there is a Run Cell option.:
-
Click Run Cell and in the status bar appears a message that the Jupyter Server is starting:
-
The editing pane is vertically split and a new tab named “Python Interactive” appears with a blue bar moving horizontally
-
Nothing happens, Code isn’t executed. blue bar keeps rolling. Status bar stays with “starting…” message.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Starting Microsoft Python language server.
Microsoft Python Language Server version 0.1.60.0
Initializing for D:\Anaconda3\envs\xxx\python.exe
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
In the log below, there is an error (I don’t have any Anaconda in C:)
console.ts:134 [Extension Host] Failed to get interpreter information for 'C:\Program Files\Anaconda\python.exe' Error: spawn C:\Program Files\Anaconda\python.exe ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
t.log @ console.ts:134
There is the complete log.
extensionService.ts:1009 [PKief.markdown-checkbox]: Menu item references the same command as default and alt-command
TMSyntax.ts:47 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///d%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///c%3A/Users/PauloEduardo/.vscode/extensions/redhat.vscode-yaml-0.1.0/syntaxes/yaml.tmLanguage.json
e.register @ TMSyntax.ts:47
log.ts:157 INFO no standard startup: panel is active
console.ts:134 [Extension Host]% Array(66)
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern *\python.exe
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern *\*\python.exe
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern *\python.exe
console.ts:134 [Extension Host] Python Extension: Create file systemwatcher with pattern *\*\python.exe
console.ts:134 [Extension Host] Python Extension: Display locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: Notify locators are locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Detected refreshing of Interpreters, Arg 1: {}, Return Value:
console.ts:134 [Extension Host] Python Extension: Register Intepreter Watcher, Arg 1: {"$mid":1,"fsPath":"d:\\dev\\xxx","external":"file:///d%3A/dev/xxx","path":"/d:/dev/xxx","scheme":"file"}, Return Value:
console.ts:134 [Extension Host] Python Extension: Register Intepreter Watcher, Arg 1: undefined, Return Value:
console.ts:134 [Extension Host] Python Extension: Build the workspace interpreter watcher, Arg 1: {"$mid":1,"fsPath":"d:\\dev\\xxx","external":"file:///d%3A/dev/xxx","path":"/d:/dev/xxx","scheme":"file"}, Return Value: UNABLE TO DETERMINE VALUE
console.ts:134 [Extension Host] Python Extension: Build the workspace interpreter watcher, Arg 1: undefined, Return Value: UNABLE TO DETERMINE VALUE
console.ts:134 [Extension Host] Python Extension: Get language server folder name, , Return Value: "languageServer.0.1.60"
console.ts:134 [Extension Host] Failed to get interpreter information for 'C:\Program Files\Anaconda\python.exe' Error: spawn C:\Program Files\Anaconda\python.exe ENOENT
at _errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:437
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Git extension API method 'getGitPath' is deprecated.
t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:437
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Hide locator refreshing progress, , Return Value:
console.ts:134 [Extension Host] Python Extension: All locators have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: Checking whether locactors have completed locating, , Return Value:
console.ts:134 [Extension Host] Python Extension: [W 22:42:55.354 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
console.ts:134 [Extension Host] Python Extension: [I 22:42:55.419 NotebookApp] Serving notebooks from local directory: C:\Users\PAULOE~1\AppData\Local\Temp
console.ts:134 [Extension Host] Python Extension: [I 22:42:55.419 NotebookApp] The Jupyter Notebook is running at:
[I 22:42:55.419 NotebookApp] http://(i7 or 127.0.0.1):8888/?token=6d81d530b1ffe2413845b87d86a3372c4d9b63f50ad6a2d8
[I 22:42:55.420 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
console.ts:134 [Extension Host] Python Extension: [C 22:42:55.425 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://(i7 or 127.0.0.1):8888/?token=6d81d530b1ffe2413845b87d86a3372c4d9b63f50ad6a2d8
console.ts:134 [Extension Host] Python Extension: [I 22:44:45.845 NotebookApp] 302 GET /?token=6d81d530b1ffe2413845b87d86a3372c4d9b63f50ad6a2d8 (::1) 0.00ms
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Actually the regex doesn’t match 127.0.0.1 either. It assumes localhost:
This is the regex. /http://localhost:[0-9]+/?token=[a-z0-9]+/
@pauloneves. With this PR: https://github.com/Microsoft/vscode-python/pull/3386 I’ve expanded our address handling. It should now be fine with localhost, IP, missing token values, and base_url values.