Message codes: Licences¶
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 |
|---|---|---|---|
license-ambiguous |
WARNING | A package's licence comes from its License :: trove classifiers (no license or License-Expression field states one), and they name several licences. Classifiers cannot say whether every licence applies (AND) or the licences offer a choice (OR). | 0.25.0 |
license-conflict |
WARNING | A pyproject.toml declares project.license as an SPDX license expression (PEP 639) and also License :: trove classifiers that state a licence, which PEP 639 forbids and pyproject-metadata refuses. A project moving to PEP 639 often declares both. | 0.25.0 |
license-db-missing |
WARNING, INFO | LicenseID's licence database is not built at the path it looks in (~/.local/share/licenseid/licenses.db). Matching a licence text to an SPDX id needs it; reading a declared expression does not. INFO when the package states a licence (only the licence-file second opinion is lost), WARNING when it states none or states a licence text, which only the database can read. | 0.25.0 |
license-db-unusable |
WARNING | LicenseID's licence database cannot be used: it is empty, invalid or unreadable, or LicenseID finds no home directory to look in (HOME, or USERPROFILE on Windows, set to nothing, or no home for the account). The detail is LicenseID's; its 'pass --db' is an option of the licenseid command, not of loom. | 0.25.0 |
license-expression-invalid |
WARNING | A licence value that looks like an SPDX license expression (an operator or a parenthesis, and a word LicenseID reads as a licence id), or any value in a field that holds an expression only (PEP 639 project.license, Core Metadata License-Expression, a file's SPDX-License-Identifier tag, GGUF general.license, a PyPI record's license_expression), names no licence LicenseID knows: an operand not on the SPDX License List (Acme-Terms, MIT OR Foo, Apache-2.0 WITH Bar, a WITH with no exception after it, read as a name), or, in a field that holds an expression only, a value on more than one line or longer than 200 characters (a licence text). The reason in brackets says which. | 0.25.0 |
license-expression-invalid/resolved |
INFO | A declared licence value is not an SPDX license expression as written, and LicenseID reads one in it beyond a change of form: a re-spelt id (Apache2), a listed licence name (MIT License), a licence URL, a separator (MIT/Apache-2.0), a stated "or later", a deprecated id reached by a re-spelling (GPLv3). The steps in brackets are LicenseID's. A change of form only (case, spacing, a + written as -or-later) is said at DEBUG, with no code. | 0.25.0 |
license-expression-malformed |
WARNING | A licence value that looks like an SPDX license expression (an operator or a parenthesis, and a word LicenseID reads as a licence id), or any value in a field that holds an expression only (PEP 639 project.license, Core Metadata License-Expression, a file's SPDX-License-Identifier tag, GGUF general.license, a PyPI record's license_expression), has a syntax LicenseID cannot parse: an operator with no operand on one side (MIT OR), a parenthesis without its match. The reason in brackets is LicenseID's. | 0.25.0 |
license-relationship-invalid |
ERROR, WARNING | After a fragment merge, a hasDeclaredLicense or hasConcludedLicense relationship has an end of the wrong type: it starts at something that is no package, file or snippet, or goes to something that is no AnyLicenseInfo or subclass (a LicenseExpression, an expandedlicensing licence or a named individual such as NoAssertionLicense). A SimpleLicensingText is not one: a licence text is reached through a LicenseExpression of one LicenseRef- that its customIdToUri maps to the text. One WARNING names each wrong end, then the ERROR ends the run. | 0.24.0 |
license-ambiguous¶
- Level: WARNING.
- Means: A package's licence comes from its License :: trove classifiers (no license or License-Expression field states one), and they name several licences. Classifiers cannot say whether every licence applies (AND) or the licences offer a choice (OR).
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: Recorded the AND of the licences, a name LicenseID reads as one id as that id, in sorted classifier order; said once per set of classifiers per process.
- Tell the user: that the SBOM assumes every licence the classifiers name applies (AND), which is wrong when they offer a choice. The project states its licence as an SPDX license expression in project.license (PEP 639) and generates again; for a dependency, its maintainers do. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: CLASSIFIERS=<classifiers>: several licence classifiers; recorded as <expression>, assuming AND (they may offer a choice) [license-ambiguous]
license-conflict¶
- Level: WARNING.
- Means: A pyproject.toml declares project.license as an SPDX license expression (PEP 639) and also License :: trove classifiers that state a licence, which PEP 639 forbids and pyproject-metadata refuses. A project moving to PEP 639 often declares both.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Read the project metadata again without the License :: classifiers; the SBOM states the expression.
- Tell the user: that the SBOM states project.license and leaves out the License :: classifiers, as PEP 639 asks; the line goes once they remove the classifiers from pyproject.toml. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: FILE=<file>: an SPDX license expression and License :: classifiers both state a licence; kept the expression, dropped the classifiers (PEP 639 transitional state) [license-conflict]
license-db-missing¶
- Level: WARNING, INFO.
- Means: LicenseID's licence database is not built at the path it looks in (~/.local/share/licenseid/licenses.db). Matching a licence text to an SPDX id needs it; reading a declared expression does not. INFO when the package states a licence (only the licence-file second opinion is lost), WARNING when it states none or states a licence text, which only the database can read.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Skipped licence text detection: a licence file or text is recorded as text, not matched to an SPDX id. A stated licence is recorded as stated. Said once per process at each level; every later lookup looks for the database again.
- Tell the user: that licence texts were not matched to SPDX ids because LicenseID's database is not built. They build it once with 'licenseid update --source packaged' (offline: the licence list packaged with LicenseID) and generate again; loom has no --db option. Do not run the command for them; ask first, and with nobody to ask, report it only.
- Lines:
INFO: licenseid database not found: '<path>'; licence text detection skipped; run 'licenseid update --source packaged' [license-db-missing]
WARNING: licenseid database not found: '<path>'; licence text detection skipped; run 'licenseid update --source packaged' [license-db-missing]
license-db-unusable¶
- Level: WARNING.
- Means: LicenseID's licence database cannot be used: it is empty, invalid or unreadable, or LicenseID finds no home directory to look in (HOME, or USERPROFILE on Windows, set to nothing, or no home for the account). The detail is LicenseID's; its 'pass --db' is an option of the licenseid command, not of loom.
- SBOM effect: thinner: the SBOM says less than reading the input would.
- Pitloom did: Skipped licence text detection: a licence file or text is recorded as text, not matched to an SPDX id. Said once per process; every later lookup tries the database again.
- Tell the user: that licence texts were not matched to SPDX ids, with LicenseID's reason as the line gives it. With no home directory, they set HOME (USERPROFILE on Windows) to the account's home directory; loom has no --db option. An empty or invalid database they rebuild with 'licenseid update --source packaged --force'; an unreadable one is a file permission they fix. Do not run commands or change the environment for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: licenseid database cannot be used: <failure>; licence text detection skipped [license-db-unusable]
license-expression-invalid¶
- Level: WARNING.
- Means: A licence value that looks like an SPDX license expression (an operator or a parenthesis, and a word LicenseID reads as a licence id), or any value in a field that holds an expression only (PEP 639 project.license, Core Metadata License-Expression, a file's SPDX-License-Identifier tag, GGUF general.license, a PyPI record's license_expression), names no licence LicenseID knows: an operand not on the SPDX License List (Acme-Terms, MIT OR Foo, Apache-2.0 WITH Bar, a WITH with no exception after it, read as a name), or, in a field that holds an expression only, a value on more than one line or longer than 200 characters (a licence text). The reason in brackets says which.
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: Recorded the value as licence text, not as an expression, and went on; said once per value per process.
- Tell the user: which value, as the line shows it, names no SPDX licence, and that the SBOM holds it as licence text. They write an id on the SPDX License List, or a LicenseRef- for a licence that is not on it, and move a licence text to a licence file (PEP 639 license-files), then generate again. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: LICENSE=<license>: not a valid SPDX license expression (<license-reason>); recorded as licence text [license-expression-invalid]
WARNING: FIELD=<field> LICENSE=<license>: not read as an SPDX license expression (<license-reason>); recorded as licence text [license-expression-invalid]
license-expression-invalid/resolved¶
- Level: INFO.
- Means: A declared licence value is not an SPDX license expression as written, and LicenseID reads one in it beyond a change of form: a re-spelt id (Apache2), a listed licence name (MIT License), a licence URL, a separator (MIT/Apache-2.0), a stated "or later", a deprecated id reached by a re-spelling (GPLv3). The steps in brackets are LicenseID's. A change of form only (case, spacing, a + written as -or-later) is said at DEBUG, with no code.
- SBOM effect: none: the SBOM states what the input holds.
- Pitloom did: Read the value as that expression. When it is the licence the package states (not a classifier set that an earlier field beats), the SBOM records the expression and its provenance keeps the value as written and the steps (Method: licenseid_resolution, Resolution-1). Said once per value per process.
- Nothing to do: Nothing to do: the SBOM records LicenseID's reading and its provenance keeps the value as written. If the reading is not what the author meant, they write the SPDX expression in the source.
- Lines:
INFO: LICENSE=<license>: read as <expression> (<steps>) [license-expression-invalid/resolved]
INFO: FIELD=<field> LICENSE=<license>: read as <expression> (<steps>) [license-expression-invalid/resolved]
license-expression-malformed¶
- Level: WARNING.
- Means: A licence value that looks like an SPDX license expression (an operator or a parenthesis, and a word LicenseID reads as a licence id), or any value in a field that holds an expression only (PEP 639 project.license, Core Metadata License-Expression, a file's SPDX-License-Identifier tag, GGUF general.license, a PyPI record's license_expression), has a syntax LicenseID cannot parse: an operator with no operand on one side (MIT OR), a parenthesis without its match. The reason in brackets is LicenseID's.
- SBOM effect: weaker: what the SBOM says is less sure.
- Pitloom did: Recorded the value as licence text, not as an expression, and went on; said once per value per process.
- Tell the user: which value, as the line shows it, is not a well-formed SPDX license expression, and that the SBOM holds it as licence text. They fix the operator syntax in the source (an operand on each side of AND, OR and WITH, matched parentheses) and generate again. Do not edit the project for them; ask first, and with nobody to ask, report it only.
- Lines:
WARNING: LICENSE=<license>: malformed SPDX license expression (<license-reason>); recorded as licence text [license-expression-malformed]
WARNING: FIELD=<field> LICENSE=<license>: malformed SPDX license expression (<license-reason>); recorded as licence text [license-expression-malformed]
license-relationship-invalid¶
- Level: ERROR, WARNING. As an ERROR, the command stops for that input and writes nothing for it (exit 1).
- Means: After a fragment merge, a hasDeclaredLicense or hasConcludedLicense relationship has an end of the wrong type: it starts at something that is no package, file or snippet, or goes to something that is no AnyLicenseInfo or subclass (a LicenseExpression, an expandedlicensing licence or a named individual such as NoAssertionLicense). A SimpleLicensingText is not one: a licence text is reached through a LicenseExpression of one LicenseRef- that its customIdToUri maps to the text. One WARNING names each wrong end, then the ERROR ends the run.
- SBOM effect: not-written: no SBOM is written for the input.
- Pitloom did: Wrote no SBOM.
- Tell the user: which relationship and which end the lines name. Do not rewrite a fragment you did not draft in this session (one by hand, or from an older Pitloom that pointed a relationship at a bare text); ask first, and with nobody to ask, report it only. One you drafted here: fix it (point its to at a LicenseExpression, or its from at a package, file or snippet) and merge again; regenerating the base SBOM does not help.
- Lines:
WARNING: RELATIONSHIP=<name>: a licence relationship goes to <target>, which is not an AnyLicenseInfo; point it at a LicenseExpression [license-relationship-invalid]
WARNING: RELATIONSHIP=<name>: a licence relationship starts at <target>, which is not a package, file or snippet; start it at one [license-relationship-invalid]
ERROR: Fragment merge left a licence relationship of the wrong type; fix the fragment [license-relationship-invalid]