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

Cannot open resource with notebook editor #4845

Closed
TarjinderSingh opened this issue Feb 17, 2021 · 8 comments
Closed

Cannot open resource with notebook editor #4845

TarjinderSingh opened this issue Feb 17, 2021 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@TarjinderSingh
Copy link

I cannot open Jupyter Notebooks from the explorer window at the moment. I get the following error. However, if I right-click and "Open in Notebook Editor", the Jupyter notebook opens well. Is there a reason or setting for this?

Cannot open resource with notebook editor type 'jupyter-notebook', please check if you have the right extension installed or enabled.
@TarjinderSingh TarjinderSingh added the bug Issue identified by VS Code Team member as probable bug label Feb 17, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Feb 17, 2021

Thanks for the bug. The problem should go away if you try a second time.

Can you check if you have this entry in your settings.json?

  "workbench.editorAssociations": [
    {
      "viewType": "jupyter.notebook",
      "filenamePattern": "*.ipynb"
    }
  ],

That should only be enabled in the insiders version of VS code. If you're using the stable version of VS code you shouldn't have that value there.

@TarjinderSingh
Copy link
Author

I do have that entry in my settings.json. I have two Macs that are synced on the same vscode settings, and one is using the insiders version and one is using the stable version. The stable version one is showing this error. Do you think the shared settings between the two is causing the issue?

@rchiodo
Copy link
Contributor

rchiodo commented Feb 17, 2021

Do you think the shared settings between the two is causing the issue?

Maybe? I thought insiders and stable wouldn't share the same settings but if they did it would cause the problem.

@TarjinderSingh
Copy link
Author

TarjinderSingh commented Feb 17, 2021

OK, I commented out that block and it works on my Stable version but not the Insiders one. The insiders one is showing "Cannot read property 'Code' of Undefined".

@rchiodo
Copy link
Contributor

rchiodo commented Feb 17, 2021

The insiders one is showing "Cannot read property 'Code' of Undefined".

This is actually this bug here: #4796. Insiders is not currently working for opening notebooks. VS code made some breaking API changes that we haven't caught up to yet.

@TarjinderSingh
Copy link
Author

TarjinderSingh commented Feb 17, 2021

OK, so I don't know why:

"workbench.editorAssociations": [
    {
      "viewType": "jupyter.notebook",
      "filenamePattern": "*.ipynb"
    }
  ],

is appearing in my stable build. But I am changing this locally for now in my stable build (by removing it and setting it to []) and I will wait for the Insiders fix soon. Thanks!

@greazer
Copy link
Member

greazer commented Feb 18, 2021

If a user has the editorAssociations setting, then opt them into the native notebook editor experiment.

@DonJayamanne
Copy link
Contributor

Validated, did use settings sync but must updated the settings manually

@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
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants