Skip to content

New python-inspector checks broke all pdt parsing #10734

@heliocastro

Description

@heliocastro

Describe the bug

With the introduction of commit 0b9fa5b , invalid null check break python-inspector PDT analysis file.

12:06:49.393 [DefaultDispatcher-worker-1] ERROR org.ossreviewtoolkit.plugins.packagemanagers.python.Pip - Unable to determine dependencies for definition file '/Users/dhxbwm7/code/cariad/optima/toolstation/requirements.txt': JsonDecodingException: Unexpected JSON token at offset 1930: Expected string literal but 'null' literal was found at path: $.files[0].packageData[0].dependencies[0].purl
Use 'coerceInputValues = true' in 'Json {}' builder to coerce nulls if property has a default value.
JSON input: .....      {
              "purl": null,
              "extracted.....
12:06:49.494 [DefaultDispatcher-worker-1] DEBUG org.eclipse.jgit.internal.util.ShutdownHook - register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda/0x00000004015a2500@48f50293 with shutdown hook

This is caused by this section under the attached pedete.json file:

          "dependencies": [
            {
              "purl": null,
              "extracted_requirement": ".",

To Reproduce

Included requirements.txt

Steps to reproduce the behavior:

  • Create a folder
  • copy requirements.txt
  • Run any Ort version after 64.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    to triageIssues that need triaging

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions