Skip to content

Message codes: Files and text

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
card-malformed WARNING The YAML frontmatter at the top of a card (the block between two --- lines) does not parse: a model card beside a local model, a dataset's own card, a Hugging Face model's card, or a Hugging Face dataset card a Hub model lists. The line gives what the parser reported. 0.23.0
dir-unlistable ERROR, WARNING A directory could not be listed (no read or search permission): the files under it were not seen. The ERROR line, for a directory named as a 'loom id generate' PATH, prints since 0.25.0. 0.22.0
file-unreadable ERROR, WARNING A file Pitloom found or was named could not be read: the operating system refused it (no read permission, a directory above it without search permission, a file another program holds open on Windows) or the read failed (an I/O error, a file that is no regular file once opened). A path named for Pitloom to read (a wheel, a project, a configuration, an ID registry, an SBOM) under a directory without search permission says so 'for the input check', not that it is not found. The ERROR line for an SBOM given to 'loom id import' or to embed, for an ID registry file, for a 'loom id generate' PATH, for a configuration file and for the input check, prints since 0.25.0. 0.22.0
file-unreadable/not-utf8 ERROR, WARNING A text file Pitloom read is not UTF-8, the encoding it must be in: a requirements file or a file a setup.cfg directive lists, a Python file read for the model usage scan (a WARNING:), or an SBOM given to embed or to import into an ID registry, an ID registry file (an ERROR:, which prints since 0.25.0), or a configuration file (an ERROR:). 0.22.0
file-unreadable/outside-project WARNING A file a project setting names, or a licence file, leads outside the project directory (a .. or absolute path, or a symbolic link out), and Pitloom reads no file outside it: its content is no part of the project. For an installed dependency, the directory is its .dist-info. 0.22.0
file-unreadable/outside-repository WARNING The build configuration of a project fetched from a Git URL lists files outside the downloaded repository (an absolute or .. path, as in a Hatchling force-include, or its .git directory), and Pitloom reads no file outside it: the repository is untrusted, and such a file is the host's. A setting entry left out before the files are listed is named as the configuration writes it, one line each; files left out once listed are only counted, never named. 0.23.4
file-unwritable ERROR, WARNING A file Pitloom writes could not be written: the operating system refused it (no write permission on the file or its directory, a read-only file system, a full disk, a directory where the file should be). Today the ID registry file, written 'for the ID registry'. 0.25.0
json-malformed ERROR, WARNING A JSON document Pitloom was given to read does not parse, or its top level is not an object; the line says which document by what it was read for: a Croissant document, PyPI's release metadata, or an SBOM given to embed or to import into an ID registry, or an ID registry file. The lines print since 0.23.0 for a Croissant document, 0.24.0 for PyPI's release metadata and 0.25.0 for an SBOM and an ID registry file. 0.23.0
over-cap ERROR, WARNING An input is larger than a cap Pitloom puts on what it reads or records, so that a crafted or unusually large input cannot exhaust time, memory or disk. 0.22.0
temp-dir-unusable ERROR, WARNING A file downloaded from PyPI or a Hugging Face repository could not be written to the temporary directory: the disk is full, the path is too long (Windows), or the directory cannot be written to. 0.24.0
text-malformed WARNING Text Pitloom read holds lone surrogates (U+D800 to U+DFFF), which UTF-8 cannot hold: a JSON or YAML \ud800 escape in a file (a model's metadata, a model or dataset card, a Croissant document, an SBOM fragment, a licence value), or a file name that is not UTF-8. For the SBOM itself, the line names the first element holding one, by its name; for a licence value, the value (LICENSE=). 0.23.0
text-malformed/registry ERROR, WARNING A name the ID registry is to hold holds lone surrogates (U+D800 to U+DFFF), which its UTF-8 file cannot hold: a file name that is not UTF-8 (loom id generate), the name or spdxId of an SBOM element (a \ud800 escape; loom id import, or the registry update of a run), or a name given to IdRegistry.register (a -e NAME). The value is shown escaped. 0.25.0

card-malformed

  • Level: WARNING.
  • Means: The YAML frontmatter at the top of a card (the block between two --- lines) does not parse: a model card beside a local model, a dataset's own card, a Hugging Face model's card, or a Hugging Face dataset card a Hub model lists. The line gives what the parser reported.
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Used nothing of the frontmatter and went on: a model card beside a local model sets no license or datasets; a Hugging Face model card also no tags, base_model, library_name, language, pipeline_tag or model-index; a dataset card no license, license_name, license_link, version, tags or pretty_name; a Hugging Face dataset card no license or keywords (the description is still read from the card's text).
  • Tell the user: which card's frontmatter is not valid YAML and what the parser reported, as the line says. They fix the card and generate again; a Hugging Face dataset card only its maintainers can fix. Do not edit the card for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: FILE=<file>: <card> frontmatter is not valid YAML; <failure> [card-malformed]

dir-unlistable

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A directory could not be listed (no read or search permission): the files under it were not seen. The ERROR line, for a directory named as a 'loom id generate' PATH, prints since 0.25.0.
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Went on without them: file discovery leaves them out of the SBOM (a build backend that lists before it excludes can name a directory it would leave out anyway); a dataset directory gets no hash (Evidence: not_measured | Reason: dir-unlistable); ID registry indexing leaves them out of the index; a model or dataset card in it is not found. As an ERROR (a directory named as a PATH to index), 'loom id generate' writes no registry and exits 1, and the library raises ValueError carrying the code.
  • Tell the user: which directory could not be listed and what the system reported, as the line says. They give the account Pitloom runs as read and search access to it and generate again. Do not change permissions or ownership, or copy or move files, for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: DIR=<dir>: could not list <use>; <failure> [dir-unlistable]
ERROR: DIR=<dir>: could not list <use>; <failure> [dir-unlistable]

file-unreadable

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A file Pitloom found or was named could not be read: the operating system refused it (no read permission, a directory above it without search permission, a file another program holds open on Windows) or the read failed (an I/O error, a file that is no regular file once opened). A path named for Pitloom to read (a wheel, a project, a configuration, an ID registry, an SBOM) under a directory without search permission says so 'for the input check', not that it is not found. The ERROR line for an SBOM given to 'loom id import' or to embed, for an ID registry file, for a 'loom id generate' PATH, for a configuration file and for the input check, prints since 0.25.0.
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Read nothing more of it and went on without what it holds, as the line says what it was read for: a file scan leaves the file out of the SBOM (loom embed-wheel keeps it, with the wheel's own hash); a hash leaves no verifiedUsing (a model's ID registry lookup is then not gated; a dataset's provenance says Evidence: not_measured | Reason: file-unreadable); a project setting's field is not set from the file; the usage scan records no model reference from it; ID registry indexing leaves it out of the index; an ID registry file read again to save the ids a run added is not saved; no dependency pins are read from a lock file; a model whose header could not be read is not listed as an AI model; a model or dataset card sets none of the fields it states; installed project metadata is ignored, and a setup.cfg or setup.py read beside another source leaves the project read without it. As an ERROR, the call that named the file raises (a Croissant document: the dataset declaration fails; an SBOM to import: the ID registry is not written; an SBOM to embed: no wheel is changed; an ID registry file, or a 'loom id generate' PATH: no registry or SBOM is written; a configuration file, or a project metadata file (a project's pyproject.toml read by the build hook says for the configuration): nothing is written; the only possible model file of a folder named for a model SBOM: no SBOM is written; the input check: the command writes nothing and exits 1, the library raises ValueError carrying the code).
  • Tell the user: which file could not be read and what the system reported, as the line says. They give the account Pitloom runs as read access to it (or close the program that holds it), or restore a damaged copy, and generate again. Do not change permissions or ownership, or copy, move or replace the file, for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: FILE=<file>: could not read <use>; <failure> [file-unreadable]
WARNING: FILE=<file>: could not read for <field>; <failure> [file-unreadable]
WARNING: FORMAT=<format> FILE=<file>: could not read header; <failure> [file-unreadable]
ERROR: FILE=<file>: could not read <use>; <failure> [file-unreadable]
ERROR: FORMAT=<format> FILE=<file>: could not read header; <failure> [file-unreadable]

file-unreadable/not-utf8

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A text file Pitloom read is not UTF-8, the encoding it must be in: a requirements file or a file a setup.cfg directive lists, a Python file read for the model usage scan (a WARNING:), or an SBOM given to embed or to import into an ID registry, an ID registry file (an ERROR:, which prints since 0.25.0), or a configuration file (an ERROR:).
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Went on without what the file holds: the field is not set from it, or the usage scan records no model reference from it. For an SBOM, wrote nothing: to embed, no wheel is changed; to import, the ID registry is not written. For an ID registry file or a configuration file, wrote nothing: no registry and no SBOM.
  • Tell the user: which file is not UTF-8 and what the decoder reported, as the line says. They save it as UTF-8 (an SBOM: generate it again) and run again. Do not convert, edit or replace the file for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: FILE=<file>: could not read <use>; not UTF-8: <failure> [file-unreadable/not-utf8]
WARNING: FILE=<file>: could not read for <field>; not UTF-8: <failure> [file-unreadable/not-utf8]
ERROR: FILE=<file>: could not read <use>; not UTF-8: <failure> [file-unreadable/not-utf8]

file-unreadable/outside-project

  • Level: WARNING.
  • Means: A file a project setting names, or a licence file, leads outside the project directory (a .. or absolute path, or a symbolic link out), and Pitloom reads no file outside it: its content is no part of the project. For an installed dependency, the directory is its .dist-info.
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Did not read it and went on without what it holds: the field is not set from it, or its licence text and copyright notices are not used.
  • Tell the user: which file lies outside the project and which setting or licence file names it, as the line says. They move or copy the file into the project, or point the setting at a file inside it, and generate again; for an installed dependency, only its maintainers can fix it. Do not move, copy or link files, or edit the setting, for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: FILE=<file>: could not read <use>; outside the project directory [file-unreadable/outside-project]
WARNING: FILE=<file>: could not read for <field>; outside the project directory [file-unreadable/outside-project]

file-unreadable/outside-repository

  • Level: WARNING.
  • Means: The build configuration of a project fetched from a Git URL lists files outside the downloaded repository (an absolute or .. path, as in a Hatchling force-include, or its .git directory), and Pitloom reads no file outside it: the repository is untrusted, and such a file is the host's. A setting entry left out before the files are listed is named as the configuration writes it, one line each; files left out once listed are only counted, never named.
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Did not read them and left them out of the SBOM: no hash, no copyright or licence text from their headers, no AI model metadata.
  • Tell the user: that the repository's build configuration names files outside it, which were left out, as the line says. To have them in the SBOM, they clone the repository, check what those paths name, and generate from the local copy. Do not clone or run on a local copy for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: FILE=<file>: outside the downloaded repository; not read [file-unreadable/outside-repository]
WARNING: listed files outside the downloaded repository<count>; not read [file-unreadable/outside-repository]

file-unwritable

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A file Pitloom writes could not be written: the operating system refused it (no write permission on the file or its directory, a read-only file system, a full disk, a directory where the file should be). Today the ID registry file, written 'for the ID registry'.
  • SBOM effect: none: the SBOM states what the input holds.
  • Pitloom did: Tried to write the file through a temporary file beside it, so a failed write leaves its old content; where the directory refuses a temporary file, the file is written in place and a failure (a full disk) can leave it part-written. As an ERROR ('loom id generate', 'loom id import'), the command exits 1. As a WARNING (loom generate (a project, wheel or environment), project, wheel and env, the library's generate_project_sbom, generate_wheel_sbom, generate_env_sbom and the PyPI and Git URL functions that call them, and loom.Run, saving the ids a run added after its SBOM is built), the SBOM stands and the ids are not saved: the next run mints them again.
  • Tell the user: which file could not be written and what the system reported, as the line says. They give the account Pitloom runs as write access to the file and its directory, or free disk space, and run again. Do not change permissions or ownership, or delete files, for them; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: FILE=<file>: could not write <use>; <failure> [file-unwritable]
WARNING: FILE=<file>: could not write <use>; <failure> [file-unwritable]

json-malformed

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A JSON document Pitloom was given to read does not parse, or its top level is not an object; the line says which document by what it was read for: a Croissant document, PyPI's release metadata, or an SBOM given to embed or to import into an ID registry, or an ID registry file. The lines print since 0.23.0 for a Croissant document, 0.24.0 for PyPI's release metadata and 0.25.0 for an SBOM and an ID registry file.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Read nothing of it: the call raises ValueError carrying the code (for PyPI's release metadata, RemoteSourceError, code pypi.response-invalid), and a command exits 1. For a Croissant document, the dataset declaration (loom.add_dataset with croissant=, or read_croissant) fails; for PyPI's release metadata of a PyPI URL, no SBOM is written; for an SBOM to embed, no wheel is changed; for one to import, the ID registry is not written; for an ID registry file, no registry and no SBOM is written, and the file is left as it is. As a WARNING (an ID registry file read again to save the ids a run added, after its SBOM is built), nothing is saved and the SBOM stands.
  • Tell the user: which document is not valid JSON, or not a JSON object, and what the parser reported, as the line says. They fix or replace a local file (for an SBOM, generate it again; for an ID registry, restore it from version control: deleting it loses every id it pins) and run again; PyPI's answer is not theirs to fix, so they retry later. Do not edit, regenerate or replace the document for them; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: FILE=<file>: not valid JSON <use>; <failure> [json-malformed]
ERROR: FILE=<file>: not a JSON object <use> [json-malformed]
WARNING: FILE=<file>: not valid JSON <use>; <failure> [json-malformed]
WARNING: FILE=<file>: not a JSON object <use> [json-malformed]

over-cap

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: An input is larger than a cap Pitloom puts on what it reads or records, so that a crafted or unusually large input cannot exhaust time, memory or disk.
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Kept what fits the cap and left the rest out, or did not read the input; the text after the semicolon says which.
  • Tell the user: which input was over which cap and what the SBOM lacks for it. Three caps are settings, which they can raise for an input they trust and then generate again: max-model-extract-bytes (and with it the per-wheel model-scan budget, four times it) by --max-model-extract-bytes or its [tool.pitloom] key; max-download-bytes (a wheel or sdist downloaded from a PyPI URL, a Git URL's checkout, or each metadata file of a Hugging Face repository) by --max-download-bytes or its key (each Hugging Face file also has its own fixed cap, Hub-JSON, model-card, license-detection or dataset-card, which raising the setting does not lift); max-dataset-hash-bytes by its key, by --max-dataset-hash-bytes of loom id generate or by the max_dataset_hash_bytes argument of loom.Run. Every other cap is fixed. Do not raise a cap or generate again for them; ask first, and with nobody to ask, report it only.
  • Lines:
WARNING: <key>=<name>: larger than the <limit>-<unit> <cap> cap; <outcome> [over-cap]
WARNING: FORMAT=<format> FILE=<file>: larger than the <limit>-<unit> <cap> cap; <outcome> [over-cap]
ERROR: config file '<path>': larger than the <limit>-<unit> <cap> cap; not read [over-cap]
ERROR: FILE=<file>: larger than the <limit>-<unit> <cap> cap <use>; not read [over-cap]
ERROR: FILE=<file>: larger than the <limit>-<unit> <cap> cap; not downloaded [over-cap]
ERROR: the repository is larger than the <limit>-<unit> <cap> cap; git <command> was stopped [over-cap]
ERROR: git <command> produced more than <size> [over-cap]
WARNING: FILE=<file>: larger than the <limit>-<unit> <cap> cap <use>; not read [over-cap]

temp-dir-unusable

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A file downloaded from PyPI or a Hugging Face repository could not be written to the temporary directory: the disk is full, the path is too long (Windows), or the directory cannot be written to.
  • SBOM effect: not-written: no SBOM is written for the input.
  • Pitloom did: Stopped the download and wrote no SBOM (the error: pypi.save-failed); for a Hugging Face file, left that file out and read the rest (the warning).
  • Tell the user: the download could not be saved locally, with the reason the line gives; the network is not the cause. They free disk space, or set TMPDIR (TEMP on Windows) to a writable directory with a short path, and run again. Do not change their temporary directory for them; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: FILE=<file>: could not be saved in the temporary directory (<failure>); not downloaded [temp-dir-unusable]
WARNING: FILE=<file>: could not be saved in the temporary directory (<failure>); <outcome> [temp-dir-unusable]

text-malformed

  • Level: WARNING.
  • Means: Text Pitloom read holds lone surrogates (U+D800 to U+DFFF), which UTF-8 cannot hold: a JSON or YAML \ud800 escape in a file (a model's metadata, a model or dataset card, a Croissant document, an SBOM fragment, a licence value), or a file name that is not UTF-8. For the SBOM itself, the line names the first element holding one, by its name; for a licence value, the value (LICENSE=).
  • SBOM effect: weaker: what the SBOM says is less sure.
  • Pitloom did: Wrote each lone surrogate as the six characters \udXXX, in the SBOM and in its provenance, and went on; said once per file (once per SBOM for element names). In a licence value (the LICENSE= line), replaced each with U+FFFD instead, said once per value.
  • Tell the user: which file (or element, or licence value) holds lone surrogates, as the line says, and that the SBOM shows each as \udXXX (U+FFFD in a licence value), not as the character the source meant. If the exact text matters, they correct the source (a proper escape, a UTF-8 file name) and generate again. Do not rename or edit files for them; ask first, and with nobody to ask, report it only.
  • Printed after: FORMAT=<format> FILE=<file>: <text> (a model scan, before a model reader's own line), on its WARNING lines; the prefix is not part of the line.
  • Lines:
WARNING: FILE=<file>: lone surrogates written as \uXXXX [text-malformed]
WARNING: FORMAT=<format> FILE=<file>: lone surrogates written as \uXXXX [text-malformed]
WARNING: LICENSE=<license>: lone surrogates replaced with U+FFFD [text-malformed]

text-malformed/registry

  • Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
  • Means: A name the ID registry is to hold holds lone surrogates (U+D800 to U+DFFF), which its UTF-8 file cannot hold: a file name that is not UTF-8 (loom id generate), the name or spdxId of an SBOM element (a \ud800 escape; loom id import, or the registry update of a run), or a name given to IdRegistry.register (a -e NAME). The value is shown escaped.
  • SBOM effect: thinner: the SBOM says less than reading the input would.
  • Pitloom did: Left it out: the file is not indexed, the element's id is not recorded, and the run goes on. As an ERROR (a name given to register it), nothing is registered: 'loom id generate' exits 1 and writes no registry; the library raises ValueError carrying the code.
  • Tell the user: which name the ID registry cannot hold, as the line shows it escaped, and that it has no pinned id. They rename the file to a UTF-8 name, or correct the SBOM or the name given, and run again. Do not rename or edit files for them; ask first, and with nobody to ask, report it only.
  • Lines:
ERROR: ID registry: <what> <value> cannot be encoded as UTF-8 (lone surrogate) [text-malformed/registry]
WARNING: ID registry: <what> <value> cannot be encoded as UTF-8 (lone surrogate); skipped [text-malformed/registry]
WARNING: ID registry: PATH '<path>': name cannot be encoded as UTF-8 (lone surrogate); not indexed [text-malformed/registry]