Skip to content

Pyspdxtools fails to parse spdx file #890

@hdxtreeem

Description

@hdxtreeem

Hello!
I am trying to run pyspdxtools on my yocto generated build spdx and fails to run.
I get the following result back from the script:

Generating LALR tables
The document couldn't be parsed; check couldn't be performed.

The following parsing error(s) were raised:

Error while constructing CreationInfo: CreationInfo.__init__() missing 6 required positional arguments: 'spdx_version', 'spdx_id', 'name', 'document_namespace', 'creators', and 'created'

What I could see the files has the designated format but not sure why it fails? Following is the snippet of the begining of the spdx file

{
 "spdxVersion": "SPDX-2.3",
 "dataLicense": "CC0-1.0",
 "SPDXID": "SPDXRef-DOCUMENT",
 "name": "device",
 "documentNamespace": "https://spdx.org/spdxdocs/gateway-f1b13a50-485f-4203-933c-11a3caf3e548",
 "creationInfo": {
  "licenseListVersion": "3.14",
  "creators": [
   "Tool: OpenEmbedded Core create-spdx.bbclass",
   "Organization: OpenEmbedded ()",
   "Person: N/A ()",
   "Tool: sbomasm-v1.0.9"
  ],
  "created": "2026-04-07T09:04:34Z",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions