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

Export uses the wrong interpreter to perform the export #1363

Closed
rchiodo opened this issue Sep 28, 2020 · 12 comments
Closed

Export uses the wrong interpreter to perform the export #1363

rchiodo opened this issue Sep 28, 2020 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Sep 28, 2020

It defaults to using the 'jupyter interpreter' instead of using the user's interpreter. This makes it impossible for the user to diagnose errors as the errors don't match what their current interpreter might report.

See this issue:
#710

@DonJayamanne

This comment has been minimized.

@rchiodo

This comment has been minimized.

@rchiodo
Copy link
Contributor Author

rchiodo commented Sep 28, 2020

To be clear I don't mean install nbconvert into the user's python interpreter. Just check it first. That would have alleviated some of the issues on the other bug.

Meaning do this:

  • Check current interpreter for nbconvert
  • If there, try running the export command
  • If fails, try the old code path

@DavidKutu
Copy link

related to microsoft/vscode-python#11396

@IanMatthewHuff IanMatthewHuff self-assigned this Oct 5, 2020
@dhuntley1023
Copy link

dhuntley1023 commented Oct 7, 2020

I concur that the bug @IanMatthewHuff links above is core to this. My notebook fails with the messages above when I do the convert from within Code, but if I do it from the command line ('jupyter nbconvert XXX --to python'), it works fine.

I'm using Conda, and the python interpreter for the extension, and the one for the notebook are both the same as the environment where I did this from the command line.

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug temp-must-fix-cotober2020 labels Nov 13, 2020
@greazer
Copy link
Member

greazer commented Nov 16, 2020

Keeping this as must-fix since #710 is affecting many users. We closed that bug in the python repo prior to opening the jupyter repo.

@IanMatthewHuff
Copy link
Member

@greazer Hang on a second. I think that I already fixed this. Did this maybe get moved over from a completed pipeline?

@IanMatthewHuff
Copy link
Member

Yeah, this was fixed.

It was this PR here in python: microsoft/vscode-python#14308
And this one in Jupyter: #181

@rchiodo
Copy link
Contributor Author

rchiodo commented Nov 16, 2020

This doesn't seem to be fixed?

Repro steps:

  1. Open notebook
  2. Switch kernel to new env
  3. Install nbconvert in new env
  4. Run export

It uses the jupyter interpreter instead?

Looking at the callstack, I'm not sure how it would ever get passed a candidate interpreter.

@IanMatthewHuff
Copy link
Member

@rchiodo are you using the command from the palette Jupyter: Export to HTML? Realized that I fixed this working with the ExportAs button, which does pass and use a candidate interpreter. Pretty sure that I didn't look at the palette commands. Will probably have to make an additional fix for them.

@rchiodo
Copy link
Contributor Author

rchiodo commented Nov 16, 2020

I used the export button at the top of a native notebook.

@joyceerhl
Copy link
Contributor

Validated.

@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

7 participants