roboflow/supervision · error · ValueError

OpenCV extra remains in {wheel}: {extras}

Error message

OpenCV extra remains in {wheel}: {extras}

What it means

Error "OpenCV extra remains in {wheel}: {extras}" thrown in roboflow/supervision.

Source

Thrown at .github/scripts/verify_clean_wheel.py:46

        ]
        if len(metadata_paths) != 1:
            raise ValueError(
                f"expected one METADATA file in {wheel}, found {metadata_paths}"
            )
        return message_from_bytes(archive.read(metadata_paths[0]))


def _validate_metadata(wheel: Path) -> None:
    """Reject wheels that retain an OpenCV runtime requirement or extra."""
    metadata = _wheel_metadata(wheel)
    requirements = metadata.get_all("Requires-Dist", [])
    extras = metadata.get_all("Provides-Extra", [])
    if any("opencv" in requirement.lower() for requirement in requirements):
        raise ValueError(
            f"OpenCV runtime requirement remains in {wheel}: {requirements}"
        )
    if any("opencv" in extra.lower() for extra in extras):
        raise ValueError(f"OpenCV extra remains in {wheel}: {extras}")


def _validate_manifest(manifest: Path) -> None:
    """Keep the installed-wheel fallback smoke contract explicit and complete."""
    checks = {
        s
        for line in manifest.read_text(encoding="utf-8").splitlines()
        if (s := line.strip()) and not s.startswith("#")
    }
    if checks != _MANIFEST_CHECKS:
        raise ValueError(
            f"unexpected fallback manifest {checks}; expected {_MANIFEST_CHECKS}"
        )


def _run_installed_wheel_probe(python: Path) -> None:
    """Exercise the installed fallback without allowing the source tree on sys.path."""
    source = """

View on GitHub (pinned to 7f254d9784)

Solutions

  1. Remove the opencv extra from the wheel metadata for the clean fallback build.
  2. Update the packaging configuration so extras referencing opencv are not included in this wheel.

When it happens

Trigger: Thrown at .github/scripts/verify_clean_wheel.py:46 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of roboflow/supervision@7f254d9784 (2026-08-15). Data as JSON: /api/errors/6d2aad569dd0af07. Report an issue: GitHub.