Message codes: Project metadata¶
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 |
|---|---|---|---|
dynamic-field-needs-build |
WARNING | A [project] field is dynamic and only a build computes it: a PDM version source other than a file or SCM tag (a call into the project's code), or an sdist's dynamic fields when the archive holds no PKG-INFO to state them. Pitloom never runs project code to read metadata. | 0.25.0 |
dynamic-field-unusable |
WARNING | A dynamic [project] field's backend resolver failed: pdm-backend reading the version from a file or SCM tag, or flit-core reading the version and description from the module without importing it. The failure is the resolver's. | 0.25.0 |
installed-metadata-ambiguous |
WARNING | More than one .dist-info or .egg-info directory in the project directory names the project (an old install left beside a new one). | 0.25.0 |
installed-metadata-unusable |
WARNING | A .dist-info or .egg-info directory in the project directory, read to complete the declared metadata, is not this project's: it has no METADATA (or PKG-INFO), or names no project or another one (a renamed project, a stale install). One whose file cannot be read says file-unreadable, for the project metadata. | 0.25.0 |
metadata-conflict |
WARNING | Two sources of the project's metadata give one field two real values: setup.py and setup.cfg (a setup() keyword overrides the setup.cfg option, as setuptools does), or the declared metadata and an installed .dist-info or .egg-info (a stale install). | 0.25.0 |
metadata-invalid |
ERROR, WARNING | A project metadata value is not what its format allows: a [project] that pyproject-metadata refuses (its words), a [project] or [tool.poetry] that is no table, a name that is no string, a version with a number too long to parse, a [project] with no name, a value of the wrong type, a setup() keyword Pitloom cannot read statically, a tool.setuptools.dynamic entry that is no {file = ...} table, or a requirements file a setting lists that is not there. | 0.25.0 |
metadata-malformed |
ERROR, WARNING | A setup.py is not Python the parser of the Python Pitloom runs on can read: a syntax error, a NUL byte, or an expression nested too deeply for it. The failure is the parser's. The nested line is the line of a module that a setup.cfg attr: directive names, too deeply nested to parse alone. | 0.25.0 |
metadata-no-effect |
WARNING | A project declares something its build backend does not read: a [tool.poetry] table or keys Poetry ignores because [project] declares the same, [tool.poetry] keys under another build backend, or pip option lines (-r, --index-url) in a requirements file setuptools reads for tool.setuptools.dynamic. | 0.25.0 |
project-name-missing |
ERROR, WARNING | No project name is found where the project's build backend reads it: a Poetry project names it in neither [tool.poetry] nor [project]; a setuptools project in neither setup.cfg [metadata] nor a setup(name=...) string literal (a name computed by code is not read). A setup.py that does not parse says metadata-malformed first. | 0.25.0 |
dynamic-field-needs-build¶
- Level: WARNING.
- Means: A [project] field is dynamic and only a build computes it: a PDM version source other than a file or SCM tag (a call into the project's code), or an sdist's dynamic fields when the archive holds no PKG-INFO to state them. Pitloom never runs project code to read metadata.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Read the project without the value: the SBOM records no version (or no such field) for it.
- Tell the user: which field is not recorded and why, as the line says. A built wheel or sdist states the value: an SBOM of it (loom wheel, an sdist with PKG-INFO) records it. Do not build or run the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: PDM version source <value> is not resolvable without running project code; version not recorded [dynamic-field-needs-build]
WARNING: FILE=<file>: dynamic <metadata-fields> not resolved without PKG-INFO; skipped [dynamic-field-needs-build]
dynamic-field-unusable¶
- Level: WARNING.
- Means: A dynamic [project] field's backend resolver failed: pdm-backend reading the version from a file or SCM tag, or flit-core reading the version and description from the module without importing it. The failure is the resolver's.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Read the project without the value: the SBOM records no version (Flit: no version and no description) from the resolver.
- Tell the user: which resolver failed and its failure, as the line says. The file the backend reads is often missing or malformed (a version file, a module docstring); they fix it and generate again. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: PDM dynamic version not resolved; <failure> [dynamic-field-unusable]
WARNING: FILE=<file>: Flit dynamic metadata not resolved; <failure> [dynamic-field-unusable]
installed-metadata-ambiguous¶
- Level: WARNING.
- Means: More than one .dist-info or .egg-info directory in the project directory names the project (an old install left beside a new one).
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: Used the one the line names: a .dist-info before an .egg-info, then by name, so the same directories give the same choice.
- Tell the user: which directories were found and which was used, as the line says. They remove the stale ones and generate again. Do not delete anything for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: DIR=<dir>: several installed-metadata candidates (<files>); used <entry> [installed-metadata-ambiguous]
installed-metadata-unusable¶
- Level: WARNING.
- Means: A .dist-info or .egg-info directory in the project directory, read to complete the declared metadata, is not this project's: it has no METADATA (or PKG-INFO), or names no project or another one (a renamed project, a stale install). One whose file cannot be read says file-unreadable, for the project metadata.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Ignored that directory: the SBOM takes nothing from it.
- Tell the user: which directory was ignored and why, as the line says. A stale one is removed, or the project reinstalled (pip install -e .), and the SBOM generated again. Do not delete or install anything for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: DIR=<dir>: <entry> has no <file>; ignored [installed-metadata-unusable]
WARNING: DIR=<dir>: <entry> declares name <name>, not the project's; ignored [installed-metadata-unusable]
WARNING: DIR=<dir>: <entry> declares no name; ignored [installed-metadata-unusable]
metadata-conflict¶
- Level: WARNING.
- Means: Two sources of the project's metadata give one field two real values: setup.py and setup.cfg (a setup() keyword overrides the setup.cfg option, as setuptools does), or the declared metadata and an installed .dist-info or .egg-info (a stale install).
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: Recorded the value the line keeps and both values as a conflict in the field's provenance.
- Tell the user: which field disagrees, what was kept and what dropped, as the line says. They make the sources agree (or reinstall the project) and generate again. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: DIR=<dir>: <field>: setup.py and setup.cfg disagree; kept setup.py's <kept>, dropped setup.cfg's <dropped> [metadata-conflict]
WARNING: DIR=<dir>: <field>: setup.py and setup.cfg disagree; kept setup.cfg's <kept>, dropped setup.py's <dropped> [metadata-conflict]
WARNING: DIR=<dir>: <field>: declared and installed metadata disagree; kept the declared <kept>, dropped the installed <dropped> [metadata-conflict]
metadata-invalid¶
- Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A project metadata value is not what its format allows: a [project] that pyproject-metadata refuses (its words), a [project] or [tool.poetry] that is no table, a name that is no string, a version with a number too long to parse, a [project] with no name, a value of the wrong type, a setup() keyword Pitloom cannot read statically, a tool.setuptools.dynamic entry that is no {file = ...} table, or a requirements file a setting lists that is not there.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: As an ERROR, wrote nothing: the command exits 1 (the Action step fails), the library raises ValueError carrying the code. As a WARNING, read on without the value: a wrong type is ignored; a setup() keyword is treated as undeclared, so a lower-priority source may give the field; a [project] with no name leaves setup.cfg and setup.py to name the project; a listed file not there gives no requirements; a [tool.poetry] relayed from a Poetry read skips Poetry's gap-fill, while poetry.lock's pins still apply.
- Tell the user: which value is refused or ignored and what was expected, as the line says; a WARNING leaves the field out of the SBOM or takes it from another source. They fix the value in the file named and generate again. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: FILE=<file>: <field> is <got>, expected <expected> [metadata-invalid]
WARNING: FILE=<file>: <field> is <got>, expected <expected> [metadata-invalid]
WARNING: FILE=<file>: <field> is <got>, expected <expected>; ignored [metadata-invalid]
ERROR: FILE=<file>: not valid [project] metadata; <failure> [metadata-invalid]
ERROR: FILE=<file>: <field> has a number over <number> digits [metadata-invalid]
WARNING: FILE=<file>: [project] has no name; read setup.cfg and setup.py instead [metadata-invalid]
WARNING: FILE=<file>: setup() keyword <name> is not read; treated as undeclared [metadata-invalid]
WARNING: FILE=<file>: setup() keyword <name> is not a literal; treated as undeclared [metadata-invalid]
WARNING: FILE=<file>: setup() keyword <name> has a value Pitloom does not read (<value>); treated as undeclared [metadata-invalid]
WARNING: FILE=<file>: setup() keyword <name> is blank; treated as undeclared [metadata-invalid]
WARNING: FILE=<file>: <field> is not a table with 'file'; ignored [metadata-invalid]
WARNING: FILE=<file>: <field> has 'attr', not supported for requirements; ignored [metadata-invalid]
WARNING: FILE=<file>: listed by <field>, not found; skipped [metadata-invalid]
WARNING: FILE=<file>: listed by <field>, not a file name; skipped [metadata-invalid]
metadata-malformed¶
- Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: A setup.py is not Python the parser of the Python Pitloom runs on can read: a syntax error, a NUL byte, or an expression nested too deeply for it. The failure is the parser's. The nested line is the line of a module that a setup.cfg attr: directive names, too deeply nested to parse alone.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: As an ERROR, wrote nothing: the command exits 1 (the Action step fails), the library raises ValueError carrying the code. As a WARNING, read the project without it: a setup.py that does not parse while setup.cfg names the project leaves setup.cfg read alone; one read for pyproject.toml's dynamic fields fills none of them; a nested attr: line leaves the field it was read for unset, said once per file and field per process.
- Tell the user: which file does not parse and the parser's failure, as the line says. They fix the syntax (setup.py runs as Python 3) or write the value as a literal, and generate again. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: FILE=<file>: not valid Python; <failure> [metadata-malformed]
WARNING: FILE=<file>: not valid Python; <failure> [metadata-malformed]
WARNING: FILE=<file>: <name> line too deeply nested to parse; skipped for <field> [metadata-malformed]
metadata-no-effect¶
- Level: WARNING.
- Means: A project declares something its build backend does not read: a [tool.poetry] table or keys Poetry ignores because [project] declares the same, [tool.poetry] keys under another build backend, or pip option lines (-r, --index-url) in a requirements file setuptools reads for tool.setuptools.dynamic.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Read the project as its build backend does, without them.
- Tell the user: which declaration has no effect and why, as the line says; the SBOM states what a build would. They move or remove it if it was meant to apply. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: <field> not read: Poetry reads [project] <metadata-fields> instead; ignored [metadata-no-effect]
WARNING: FILE=<file>: [tool.poetry] <entries> not read: build-backend <backend> does not read them; ignored [metadata-no-effect]
WARNING: FILE=<file>: <field>: pip option lines <entries>, which setuptools does not accept; skipped [metadata-no-effect]
project-name-missing¶
- Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: No project name is found where the project's build backend reads it: a Poetry project names it in neither [tool.poetry] nor [project]; a setuptools project in neither setup.cfg [metadata] nor a setup(name=...) string literal (a name computed by code is not read). A setup.py that does not parse says metadata-malformed first.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: As an ERROR, wrote nothing: the command exits 1 (the Action step fails), the library raises ValueError carrying the code. The setuptools line raises FileNotFoundError, also carrying the code. As a WARNING, a Poetry read for poetry.lock's pins skipped Poetry's gap-fill and still applied the pins.
- Tell the user: that the project has no name Pitloom can read, and where it looked, as the line says. They declare name in [project] (or [tool.poetry], setup.cfg [metadata], or setup() as a string literal) and generate again. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
ERROR: FILE=<file>: neither [tool.poetry] nor [project] has a project name [project-name-missing]
WARNING: FILE=<file>: neither [tool.poetry] nor [project] has a project name [project-name-missing]
ERROR: DIR=<dir>: no project name in setup.cfg [metadata] or a literal setup(name=...) [project-name-missing]
ERROR: FILE=<file>: [metadata] has no project name [project-name-missing]
ERROR: FILE=<file>: no project name: setup(name=...) is not a string literal [project-name-missing]