File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/client/pythonEnvironments Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import { asyncFilter } from '../common/utils/arrayUtils';
26
26
import { CondaEnvironmentInfo , isCondaEnvironment } from './common/environmentManagers/conda' ;
27
27
import { isMicrosoftStoreEnvironment } from './common/environmentManagers/microsoftStoreEnv' ;
28
28
import { CondaService } from './common/environmentManagers/condaService' ;
29
- import { traceVerbose } from '../logging' ;
29
+ import { traceError , traceVerbose } from '../logging' ;
30
30
31
31
const convertedKinds = new Map (
32
32
Object . entries ( {
@@ -159,11 +159,16 @@ class ComponentAdapter implements IComponentAdapter {
159
159
160
160
// We use the same getInterpreters() here as for IInterpreterLocatorService.
161
161
public async getInterpreterDetails ( pythonPath : string ) : Promise < PythonEnvironment | undefined > {
162
- const env = await this . api . resolveEnv ( pythonPath ) ;
163
- if ( ! env ) {
162
+ try {
163
+ const env = await this . api . resolveEnv ( pythonPath ) ;
164
+ if ( ! env ) {
165
+ return undefined ;
166
+ }
167
+ return convertEnvInfo ( env ) ;
168
+ } catch ( ex ) {
169
+ traceError ( `Failed to resolve interpreter: ${ pythonPath } ` , ex ) ;
164
170
return undefined ;
165
171
}
166
- return convertEnvInfo ( env ) ;
167
172
}
168
173
169
174
// Implements ICondaService
You can’t perform that action at this time.
0 commit comments