Skip to content

BUG: can't discover pytest tests because of ValueError: sourece code string cannot contain null bytes #19789

@tigerhawkvok

Description

@tigerhawkvok

Reporting in this format because of #19787

[ERROR 2022-8-6 10:12:23.977]: Error discovering pytest tests:
 n [Error]: Traceback (most recent call last):
  File "c:\Users\pkahn\.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\testing_tools\run_adapter.py", line 17, in <module>
    from testing_tools.adapter.__main__ import parse_args, main
ValueError: source code string cannot contain null bytes

    at ChildProcess.<anonymous> (c:\Users\pkahn\.vscode\extensions\ms-python.python-2022.14.0\out\client\extension.js:2:240364)
    at Object.onceWrapper (node:events:646:26)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

for extension

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

Metadata

Metadata

Assignees

Labels

area-testingbugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions