question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test framework "undefined" is not installed

See original GitHub issue

Environment data

  • VS Code version: 1.33.1
  • Extension version (available under the Extensions sidebar): 2019.4.6828-alpha

Steps to reproduce:

have a Python file open, create a venv (e.g. called “env”), select its interpreter. Enable unittest on the settings.json, and then delete the “env” folder and run the Discover Tets command. This prompt will appear: image

Clicking on yes just hides the prompt.

Logs

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

Test Discovery failed: 
Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT
Test Discovery failed: 
Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT
Test Discovery failed: 
Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT
Test Discovery failed: 
Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT
Test Discovery failed: 
Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT
Test Discovery failed: 
Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT
start
Test Discovery failed: 
Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

workbench.main.js:sourcemap:2370 Test framework undefined is not installed. Install?
onDidNotificationChange @ workbench.main.js:sourcemap:2370
workbench.main.js:sourcemap:235 [Extension Host] Python Extension: displayDiscoverStatus Error: spawn c:\Users\luabud\Apps\Example\Ex1\env\Scripts\python.exe ENOENT
	at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
	at onErrorNT (internal/child_process.js:406:16)
	at process._tickCallback (internal/process/next_tick.js:63:19)
t.log @ workbench.main.js:sourcemap:235

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nmcspaddencommented, May 28, 2019

UPDATE: It resolved itself after I deleted the local .vscode folder inside the project, saved the workspace, and created a new .vscode/settings.json containing the testing settings. That seems to have fixed it.

ORIGINAL ISSUE:

I’m experiencing this identical issue. It was working yesterday, but today I restarted and now I get the exact same behavior:

VS Code 1.34.0

Extension:

Name: Python
Id: ms-python.python
Description: Linting, Debugging (multi-threaded, remote), Intellisense, code formatting, refactoring, unit tests, snippets, and more.
Version: 2019.4.12954
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python

Output log:

Test Discovery failed: 
Error: spawn C:\Program Files\Python27\python.exe ENOENT
Test Discovery failed: 
Error: spawn C:\Program Files\Python27\python.exe ENOENT

Dev tools console:

Python Extension: displayDiscoverStatus TypeError: Cannot read property 'uri' of undefined
	at module.exports.t.BaseTestManager._discoverTests.serviceContainer.get.discoverTests.then.catch.e (C:\Users\nmcspadden\.vscode\extensions\ms-python.python-2019.4.12954\out\client\extension.js:1:329501)
	at process._tickCallback (internal/process/next_tick.js:68:7)
  | t.log | @ | workbench.main.js:238
-- | -- | -- | --
  | $logExtensionHostMessage | @ | workbench.main.js:3178
  | _doInvokeHandler | @ | workbench.main.js:3252
  | _invokeHandler | @ | workbench.main.js:3252
  | _receiveRequest | @ | workbench.main.js:3251
  | _receiveOneMessage | @ | workbench.main.js:3249
  | _protocol.onMessage.e | @ | workbench.main.js:3248
  | fire | @ | workbench.main.js:77
  | a | @ | workbench.main.js:321
  | e | @ | workbench.main.js:321
  | fire | @ | workbench.main.js:77
  | _receiveMessage | @ | workbench.main.js:330
  | S._socketDisposables.push._socketReader.onMessage.e | @ | workbench.main.js:327
  | fire | @ | workbench.main.js:77
  | acceptChunk | @ | .main.js:323
  | _register._socket.onData.e | @ | workbench.main.js:323
  | t | @ | workbench.main.js:332
  | emit | @ | events.js:182
  | addChunk | @ | _stream_readable.js:279
  | readableAddChunk | @ | _stream_readable.js:264
  | Readable.push | @ | _stream_readable.js:219
  | onread | @ | net.js:636

I’ve confirmed I do not have a local workspace settings JSON file, nor a pycache folder of any kind.

0reactions
brettcannoncommented, Aug 6, 2019

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.

Read more comments on GitHub >

github_iconTop Results From Across the Web

undefined is not a function!" when running Karma test suite ...
I found that when I commented out sinon-chai from my frameworks array, the error went away (unfortunately I need sinon-chai for my tests,...
Read more >
Failed to load plugin '@typescript-eslint' declared in '.eslintrc ...
Bug: (TypeError: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.json': Class extends value undefined is not a constructor or null) #15149.
Read more >
Google test linking error as method definition not found
to Google C++ Testing Framework. I have a class called skiplist which has 3 public virtual methods and which are defined in the...
Read more >
Automated Test Framework error: "This step failed because a ...
Workaround · Open the developer tools browser console on the Client Test Runner page. · Navigate to Automated Test Framework > Tests and...
Read more >
Changelog - Cypress Documentation
Fixes #24169; Fixed an 11.0.0 regression where modifying the currently loaded component testing spec in open mode does not trigger a rerun of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found