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

Recommend updating traitlets to 5.1.1 if jupyter fails to start #8307

Merged
merged 8 commits into from
Nov 19, 2021

Conversation

DonJayamanne
Copy link
Contributor

@DonJayamanne DonJayamanne commented Nov 18, 2021

For #8295

image

@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2021

Codecov Report

Merging #8307 (9255451) into main (f3f77cf) will increase coverage by 0%.
The diff coverage is 87%.

@@          Coverage Diff          @@
##            main   #8307   +/-   ##
=====================================
  Coverage     72%     72%           
=====================================
  Files        372     372           
  Lines      23193   23232   +39     
  Branches    3542    3553   +11     
=====================================
+ Hits       16752   16787   +35     
- Misses      4993    4995    +2     
- Partials    1448    1450    +2     
Impacted Files Coverage Δ
src/client/datascience/jupyter/kernels/kernel.ts 77% <33%> (-1%) ⬇️
...rc/client/datascience/jupyter/jupyterConnection.ts 86% <40%> (-2%) ⬇️
src/client/datascience/jupyter/notebookStarter.ts 70% <50%> (+<1%) ⬆️
src/client/datascience/errors/errorHandler.ts 70% <93%> (+4%) ⬆️
src/client/common/errors/errorUtils.ts 71% <100%> (+5%) ⬆️
src/client/common/utils/localize.ts 95% <100%> (+<1%) ⬆️
src/client/logging/trace.ts 80% <100%> (+<1%) ⬆️
src/client/common/application/workspace.ts 82% <0%> (-6%) ⬇️
src/client/datascience/raw-kernel/rawSocket.ts 82% <0%> (-2%) ⬇️
...atascience/interactive-window/interactiveWindow.ts 69% <0%> (-2%) ⬇️
... and 9 more

@DonJayamanne DonJayamanne marked this pull request as ready for review November 19, 2021 18:15
@DonJayamanne DonJayamanne requested a review from a team as a code owner November 19, 2021 18:15
);
export const failedToStartJupyterDueToOutdatedTraitlets = localize(
'DataScience.failedToStartJupyterDueToOutdatedTraitlets',
"Failed to start Jupyter in the environment '{0}' possibly due to an outdated version of 'traitlets'. \n{1} \nConsider updating the 'traitlets' module to '5.1.1' or later. \nView Jupyter [log](command:jupyter.viewOutput) for further details."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 variations of errors we display.
If we have an error message from python (e.g. we have a python stack trace & have been able to capture the python error, then we display that, else we display a generic error message).
If we can find a specific error thats generally associated with the traitlets being old, then we have another for that.

@@ -96,6 +97,11 @@ export const activate: ActivationFunction = (_context) => {
line = line.replace(matches[0], `<a href='command:${matches[1]}'>${matches[2]}</a>`);
}
}
while ((matches = akaMsLinks.exec(line)) !== null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified to support https links to aka.ms links
This way the More info is also displayed in the error output

) {
void this.showMessageWithMoreInfo(
DataScience.failedToStartJupyterDueToOutdatedTraitlets().format(envDisplayName, pythonError || ''),
'https://aka.ms/kernelFailuresJupyterTrailtletsOutdated',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a misspell here, or is the aka link also misspelled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yuck, i'll leave that spelling, as the link works and from what I know we can't delete those links.
Also no harm in that.

Copy link
Member

@IanMatthewHuff IanMatthewHuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with possible spelling fix

@DonJayamanne DonJayamanne changed the title Recommend updating traitlets to version 5.1.1 if jupyter fails to start Recommend updating traitlets to 5.1.1 if jupyter fails to start Nov 19, 2021
@DonJayamanne DonJayamanne merged commit 8734a9b into main Nov 19, 2021
@DonJayamanne DonJayamanne deleted the issue8295 branch November 19, 2021 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants