Skip to content
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

Jupyter notebook failed to launch. TypeError: Cannot read property 'toLocaleLowerCase' of undefined #3732

Closed
klonuo opened this issue Dec 5, 2018 · 5 comments
Assignees

Comments

@klonuo
Copy link

klonuo commented Dec 5, 2018

Environment data

  • VS Code version: 1.29.1
  • Extension version (available under the Extensions sidebar): Python extension 2018.11.0
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6 (on path)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: jupyter notebook server 5.7.2

Expected behaviour

Run notebook cell:

#%%
import requests

Actual behaviour

N/A

Logs

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

workbench.main.js:sourcemap:2429 Jupyter notebook failed to launch.  TypeError: Cannot read property 'toLocaleLowerCase' of undefined

workbench.main.js:sourcemap:294 [Extension Host] Failed to get interpreter information for 'C:\Program Files\nodejs\node.exe' SyntaxError: Unexpected token C in JSON at position 0
	at JSON.parse (<anonymous>)
	at d.<anonymous> (C:\Users\klo\.vscode\extensions\ms-python.python-2018.11.0\out\client\extension.js:83:285742)
	at Generator.next (<anonymous>)
	at s (C:\Users\klo\.vscode\extensions\ms-python.python-2018.11.0\out\client\extension.js:83:284981)
	at <anonymous>

workbench.main.js:sourcemap:294 [Extension Host] Python Extension: Error: Jupyter notebook failed to launch. 
TypeError: Cannot read property 'toLocaleLowerCase' of undefined
@shswindell42
Copy link

shswindell42 commented Dec 6, 2018

I'm experiencing this issue as well. Running a notebook cell worked last week, so I'm guessing there was a change that is causing the issue.

Update: Installed version 2018.10.1 of the python extension and 'Run cell' works.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 6, 2018

Looks to be a kernel spec issue. There's a kernel spec that doesn't specify language or path.

@rchiodo rchiodo self-assigned this Dec 6, 2018
@rchiodo
Copy link
Contributor

rchiodo commented Dec 6, 2018

You can enumerate your kernelspecs with 'jupyter kernelspec list'.

One of the kernelspecs listed is missing the language or path in the json.

We recently started forcing a kernel spec so that's the likely cause. Our code is not checking that the language element is missing, and hence the crash.

@shswindell42
Copy link

Thanks! I checked the files and sure enough one of them didn't have language set in the json. I added it, updated the extension back to 2018.11.0 and it's working now! Much appreciated!

@rchiodo
Copy link
Contributor

rchiodo commented Dec 7, 2018

This should be fixed in our insiders build

@rchiodo rchiodo closed this as completed Dec 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 4, 2019
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants