Skip to content

Message codes: PyPI

See also: Message codes (the index of every code) and Messages and codes (the line grammar, what a code guarantees and when to trust one).

Trust a code only when the line is one of the lines below, a value in place of each <name>, after at most one prefix: the index lists the prefixes and message-codes-values.md the values.

Codes

Code Level Means Since
digest-invalid ERROR The SHA-256 of the file Pitloom downloaded differs from the one PyPI declares for it: the download is corrupt or was altered on the way. 0.24.0
file-ambiguous INFO The release has several wheels that fit the Python and platform Pitloom runs on, or several sdists, or (loom generate, generate()) both a wheel and an sdist; Pitloom chose one. 0.24.0
pypi-response-invalid ERROR, WARNING The answer of the PyPI JSON API is not one Pitloom reads: it is for another project, lacks a field it needs, or declares no SHA-256 digest for the file. A file of a release whose entry is not valid is left out of the choice, with a warning. 0.24.0
pypi-url-invalid ERROR A URL on a PyPI host is not one Pitloom reads: it is not a project or release page (https://pypi.org/project// or ...///), is not https, holds a user name or password, is on another index (test.pypi.org) or PyPI's old address (pypi.python.org), is a link to a file (files.pythonhosted.org), or names a project or version that is not valid. 0.24.0
pypi-url-unusable ERROR A PyPI URL was given to a command or option that cannot use it: loom wheel --embed (it would write into a temporary copy of the wheel), loom model or generate_model_sbom() (a release is not a model), or a library call that fetches a Git repository (generate_git_sbom(), generate_git_project_sbom(), fetch_git_project()). 0.24.0
release-file-not-found ERROR The release the URL names has no wheel for 'loom wheel' to read. 0.24.0
release-file-not-found/compatible-wheel ERROR The release the URL names has wheels, but none whose tags this Python and platform accept. 0.24.0
release-file-not-found/sdist ERROR The release the URL names has no sdist for 'loom project' to read. 0.24.0
release-not-found ERROR PyPI does not hold the project or the release the URL names, or (for a URL without a version) no release of the project has a wheel or sdist with a SHA-256 digest to read. 0.24.0
release-unpinned INFO The URL names a project without a version, so Pitloom chose the latest stable release that is not yanked. 0.24.0
release-unpinned/prerelease INFO The URL names a project without a version and no stable release is left that is not yanked, so Pitloom chose the newest pre-release that is not yanked. 0.24.0
release-unpinned/yanked INFO The URL names a project without a version and every release is yanked, so Pitloom chose the newest one. 0.24.0
release-unusable INFO The file Pitloom reads is yanked: its maintainers withdrew it, with the reason shown. Either the URL names a release whose files are yanked, or every file of the kind asked for that matches this environment is yanked (the release itself still has files that are not). 0.24.0

digest-invalid

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: The SHA-256 of the file Pitloom downloaded differs from the one PyPI declares for it: the download is corrupt or was altered on the way.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Did not read the file, and wrote no SBOM. The error code is pypi.digest-mismatch.
  • Tell the user: the downloaded file does not match the digest PyPI declares, so Pitloom did not read it, and that the file may have been altered. They may run again; if it repeats, report it to PyPI. Do not read the file by other means; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: FILE=<file>: SHA-256 <sha256> does not match <declared> declared by <source>; not read [digest-invalid]

file-ambiguous

  • Level: INFO.
  • Means: The release has several wheels that fit the Python and platform Pitloom runs on, or several sdists, or (loom generate, generate()) both a wheel and an sdist; Pitloom chose one.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Read the best-ranked wheel (the tag order of the running environment), the one sdist named, or, for loom generate and generate(), the wheel.
  • Tell the user: which file was read, as the line names it, and that the choice follows the running environment. A different wheel is read by running Pitloom on that platform, or on a downloaded file; the sdist by the loom project command (or generate_pypi_sbom() call) the line gives. Do not run again for another file; ask first, and with nobody to ask, report it only.
  • Lines:
INFO: PYPI=<name> VERSION=<version>: <number> wheels match this environment; using <file>, the best-ranked [file-ambiguous]
INFO: PYPI=<name> VERSION=<version>: <number> sdists; using <file> [file-ambiguous]
INFO: PYPI=<name>: loom generate reads the wheel; 'loom project <url>' reads the sdist [file-ambiguous]
INFO: PYPI=<name>: generate() reads the wheel; generate_pypi_sbom('<url>', kind='sdist') reads the sdist [file-ambiguous]

pypi-response-invalid

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: The answer of the PyPI JSON API is not one Pitloom reads: it is for another project, lacks a field it needs, or declares no SHA-256 digest for the file. A file of a release whose entry is not valid is left out of the choice, with a warning.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Did not download the file and wrote no SBOM (an error), or left the file out and chose among the rest (the warning). The error code is pypi.response-invalid.
  • Tell the user: PyPI's answer was not usable, as the line says. Without a digest Pitloom cannot check the download, so it reads nothing. They may run again later; if it repeats, the project's release is malformed on PyPI. A skipped file only narrows the choice; report it only. Do not read the file by other means; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: FILE=<file>: PyPI declares no SHA-256 digest; not downloaded [pypi-response-invalid]
ERROR: PYPI=<name>: PyPI answered for project <answered>; not read [pypi-response-invalid]
ERROR: PYPI=<name>: the PyPI JSON API answer has no valid <field>; not read [pypi-response-invalid]
WARNING: PYPI=<name> FILE=<file>: <why>; skipped [pypi-response-invalid]

pypi-url-invalid

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A URL on a PyPI host is not one Pitloom reads: it is not a project or release page (https://pypi.org/project// or ...///), is not https, holds a user name or password, is on another index (test.pypi.org) or PyPI's old address (pypi.python.org), is a link to a file (files.pythonhosted.org), or names a project or version that is not valid.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Wrote no SBOM, and sent no request.
  • Tell the user: which part of the URL was refused, as the line says, and that Pitloom reads https://pypi.org/project// or https://pypi.org/project/// only. They correct the URL and run again; a release on another index is read by downloading the file and running Pitloom on it. Do not guess another URL; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: URL=<url>: not a PyPI project or release page; give https://pypi.org/project/<name>/ or .../<name>/<version>/ [pypi-url-invalid]
ERROR: URL=<url>: PyPI is read over https only; give the https:// URL [pypi-url-invalid]
ERROR: URL=<url>: holds user information; a PyPI URL is read without credentials [pypi-url-invalid]
ERROR: URL=<url>: only pypi.org is read; another index is not supported yet [pypi-url-invalid]
ERROR: URL=<url>: pypi.python.org is PyPI's old address; give https://pypi.org/project/<name>/ [pypi-url-invalid]
ERROR: URL=<url>: a file link is not read yet; give the project or release page https://pypi.org/project/<name>/<version>/ [pypi-url-invalid]
ERROR: URL=<url>: <name> is not a valid project name [pypi-url-invalid]
ERROR: URL=<url>: <version> is not a PEP 440 version [pypi-url-invalid]

pypi-url-unusable

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A PyPI URL was given to a command or option that cannot use it: loom wheel --embed (it would write into a temporary copy of the wheel), loom model or generate_model_sbom() (a release is not a model), or a library call that fetches a Git repository (generate_git_sbom(), generate_git_project_sbom(), fetch_git_project()).
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Fetched nothing and wrote no SBOM.
  • Tell the user: which command or option cannot take the URL. For --embed they download the wheel and run 'loom wheel FILE --embed'; for a model they use 'loom wheel URL' or 'loom project URL'; from Python, generate_pypi_sbom() (or generate()) instead of the Git or model call. Do not download or embed for them; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: URL=<url>: --embed writes into a wheel file, and a PyPI URL has none to keep; nothing fetched [pypi-url-unusable]
ERROR: URL=<url>: a PyPI page is not a model; 'loom wheel' reads its wheel, 'loom project' its sdist; nothing fetched [pypi-url-unusable]
ERROR: URL=<url>: a PyPI page is not a Git repository; generate_pypi_sbom(), 'loom wheel' or 'loom project' reads it; nothing fetched [pypi-url-unusable]

release-file-not-found

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: The release the URL names has no wheel for 'loom wheel' to read.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Wrote no SBOM. The error code is pypi.no-wheel.
  • Tell the user: the release has no wheel, and that the command in the line reads its sdist. Offer it. Do not run it for them; with nobody to ask, report it only.
  • Lines:
ERROR: PYPI=<name> VERSION=<version>: the release has no wheel; 'loom project <url>' reads its sdist [release-file-not-found]

release-file-not-found/compatible-wheel

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: The release the URL names has wheels, but none whose tags this Python and platform accept.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Wrote no SBOM. The error code is pypi.no-compatible-wheel.
  • Tell the user: no wheel of the release matches the Python and platform Pitloom runs on, naming the wheels the line lists, and that the command in the line reads the sdist instead. They may also run Pitloom on the platform of the wheel they want. Offer the sdist command. Do not run it for them. With nobody to ask, report it only.
  • Lines:
ERROR: PYPI=<name> VERSION=<version>: no wheel matches this Python and platform (wheels: <files>); 'loom project <url>' reads its sdist [release-file-not-found/compatible-wheel]

release-file-not-found/sdist

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: The release the URL names has no sdist for 'loom project' to read.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Wrote no SBOM. The error code is pypi.no-sdist.
  • Tell the user: the release has no sdist, and that the command in the line reads a wheel. Offer it. Do not run it for them; with nobody to ask, report it only.
  • Lines:
ERROR: PYPI=<name> VERSION=<version>: the release has no sdist; 'loom wheel <url>' reads a wheel [release-file-not-found/sdist]

release-not-found

  • Level: ERROR. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: PyPI does not hold the project or the release the URL names, or (for a URL without a version) no release of the project has a wheel or sdist with a SHA-256 digest to read.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Wrote no SBOM. The error code is pypi.project-not-found or pypi.release-not-found.
  • Tell the user: which project or release PyPI does not hold. They check the spelling of the name and the version, and that the project is not deleted, and run again. Do not guess another name or version; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: PYPI=<name>: no such project on PyPI [release-not-found]
ERROR: PYPI=<name> VERSION=<version>: no such release on PyPI [release-not-found]
ERROR: PYPI=<name>: no release has a wheel or sdist with a SHA-256 digest [release-not-found]

release-unpinned

  • Level: INFO.
  • Means: The URL names a project without a version, so Pitloom chose the latest stable release that is not yanked.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Read the latest release.
  • Tell the user: which release was read, as the line names it, and that the URL named no version. For a repeatable result they give the version in the URL (https://pypi.org/project///). Do not run again with another version; ask first, and with nobody to ask, report it only.
  • Lines:
INFO: PYPI=<name> VERSION=<version>: no version given; using the latest release [release-unpinned]

release-unpinned/prerelease

  • Level: INFO.
  • Means: The URL names a project without a version and no stable release is left that is not yanked, so Pitloom chose the newest pre-release that is not yanked.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Read the newest pre-release.
  • Tell the user: which release was read, as the line names it, and that the URL named no version. For a repeatable result they give the version in the URL (https://pypi.org/project///). Do not run again with another version; ask first, and with nobody to ask, report it only.
  • Lines:
INFO: PYPI=<name> VERSION=<version>: no version given and no stable release that is not yanked; using the newest pre-release [release-unpinned/prerelease]

release-unpinned/yanked

  • Level: INFO.
  • Means: The URL names a project without a version and every release is yanked, so Pitloom chose the newest one.
  • SBOM effect: weaker: what the SBOM says is less sure.
  • Pitloom did: Read the newest release, which its maintainers withdrew.
  • Tell the user: every release of the project is yanked, so the newest was read although its maintainers withdrew it, with the reason the line gives. Whether to rely on the SBOM is their decision. Do not read another release for them; report it only.
  • Lines:
INFO: PYPI=<name> VERSION=<version>: no version given and every release is yanked; using the newest (yanked: <why>) [release-unpinned/yanked]

release-unusable

  • Level: INFO.
  • Means: The file Pitloom reads is yanked: its maintainers withdrew it, with the reason shown. Either the URL names a release whose files are yanked, or every file of the kind asked for that matches this environment is yanked (the release itself still has files that are not).
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Read the yanked file: a yanked file is passed over only while one that is not yanked fits.
  • Tell the user: the file is yanked and why, as the line says, and that no file of that release fitting the request is not yanked. Whether to rely on it is their decision. Do not read another release or file for them; report it only.
  • Lines:
INFO: PYPI=<name> VERSION=<version> FILE=<file>: the file is yanked (<why>); reading it anyway [release-unusable]