Skip to content

More logging for kernelspec problems #10132

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

Merged
merged 5 commits into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/client/datascience/jupyter/interpreter/jupyterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export class InterpreterJupyterKernelSpecCommand extends InterpreterJupyterComma

const defaultAction = () => {
if (exception) {
traceError(`Exception attempting to enumerate kernelspecs: `, exception);
throw exception;
}
return output;
Expand All @@ -243,10 +244,12 @@ export class InterpreterJupyterKernelSpecCommand extends InterpreterJupyterComma
try {
if (args.join(' ').toLowerCase() === 'list --json') {
// Try getting kernels using python script, if that fails (even if there's output in stderr) rethrow original exception.
return this.getKernelSpecList(interpreter, options);
output = await this.getKernelSpecList(interpreter, options);
return output;
} else if (args.join(' ').toLowerCase() === '--version') {
// Try getting kernelspec version using python script, if that fails (even if there's output in stderr) rethrow original exception.
return this.getKernelSpecVersion(interpreter, options);
output = await this.getKernelSpecVersion(interpreter, options);
return output;
}
} catch (innerEx) {
traceError('Failed to get a list of the kernelspec using python script', innerEx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { CancellationToken } from 'vscode';
import { IApplicationShell } from '../../../common/application/types';
import { Cancellation, createPromiseFromCancellation, wrapCancellationTokens } from '../../../common/cancellation';
import { ProductNames } from '../../../common/installer/productNames';
import { traceError } from '../../../common/logger';
import { IInstaller, InstallerResponse, Product } from '../../../common/types';
import { Common, DataScience } from '../../../common/utils/localize';
import { noop } from '../../../common/utils/misc';
Expand Down Expand Up @@ -302,7 +303,8 @@ export class JupyterInterpreterDependencyService {
return command
.exec(['--version'], { throwOnStdErr: true })
.then(() => true)
.catch(() => {
.catch(e => {
traceError(`Kernel spec not found: `, e);
sendTelemetryEvent(Telemetry.KernelSpecNotFound);
return false;
});
Expand Down
2 changes: 1 addition & 1 deletion src/test/datascience/variableexplorer.functional.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ myDict = {'a': 1}`;
{
name: 'mySet',
value: undefined,
supportsDataExplorer: true,
supportsDataExplorer: false,
type: 'set',
size: 54,
shape: '',
Expand Down