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

vscode-python conflicts with Jupyter notebook preview extension #3741

Closed
carbocation opened this issue Dec 15, 2018 · 5 comments
Closed

vscode-python conflicts with Jupyter notebook preview extension #3741

carbocation opened this issue Dec 15, 2018 · 5 comments
Assignees

Comments

@carbocation
Copy link

Environment data

  • VS Code Version: 1.30.0

  • VS Code Commit: c6e592b2b5770e40a98cb9c2715a8ef89aec3d74

  • VS Code Date: 2018-12-11T22:21:33.585Z

  • VS Code Electron: 2.0.12

  • VS Code Chrome: 61.0.3163.100

  • VS Code Node.js: 8.9.3

  • VS Code V8: 6.1.534.41

  • VS Code OS: Linux x64 4.15.0-42-generic

  • Extension version (available under the Extensions sidebar): 2018.12.1

  • Python version (& distribution if applicable, e.g. Anaconda): N/A

  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A

  • Relevant/affected Python packages and their versions: N/A

Expected behaviour

I do not expect the presence of the Microsoft Python extension to interfere with the ability of other extensions to show Jupyter Notebook previews.

Actual behaviour

The presence of the Microsoft Python extension to interferes with the ability of other extensions to show Jupyter Notebook previews in VS Code. ( See jithurjacob/vscode-nbpreviewer#13 (comment) )

Steps to reproduce:

  1. Install the Microsoft Python extension.
  2. Install the VS Code Jupyter Notebook Previewer v1.1.0 by @jithurjacob .
  3. Open a Jupyter notebook. The preview button will not appear. It will appear if the Microsoft Python extension is removed and VS Code is reloaded.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

N/A

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

(See screenshot below; sorry this was not captured as text.)

image

@jithurjacob
Copy link

I am the author of the extension vscode-nbpreviewer. As per my understanding this is happening
because the *.ipynb files are being opened as "jupyter" where my extension expects it to be "ipython". Please let me know if this is as an exception case that I failed to handle.

@IanMatthewHuff IanMatthewHuff self-assigned this Dec 17, 2018
@IanMatthewHuff
Copy link
Member

Taking a peek quick. As @jithurjacob mentions it looks like this might just be a conflict between how the MS extension and the other extension want to classify .ipynb files.

@IanMatthewHuff
Copy link
Member

Yup, it's the registration issue. Both extensions try to hook up .ipynb to a different language tag. I tried moving the our extension to "ipython" instead of jupyter and in that case both extensions could work together at the same time. @jithurjacob would you be willing to have your extension move the .ipynb registration over to "jupyter" as well? I know that this was added in our extension after yours, but I don't feel like tying .ipynb to ipython is correct. .ipynb is the overall notebook format since the big split and is not tied to the ipython kernel. If you want, I could submit a PR for this, it's a pretty small change.

@jithurjacob
Copy link

@IanMatthewHuff No worries I will change it to jupyter.

@IanMatthewHuff
Copy link
Member

Thanks @jithurjacob. Much appreciated. I'm going to close down this issue on this side since the registration will be changing in nbpreview.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 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