Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoneType not handled in add_referenced_license_matches_for_package #3969

Open
FaberFlorian opened this issue Nov 4, 2024 · 1 comment · May be fixed by #3970
Open

NoneType not handled in add_referenced_license_matches_for_package #3969

FaberFlorian opened this issue Nov 4, 2024 · 1 comment · May be fixed by #3970
Assignees
Labels

Comments

@FaberFlorian
Copy link

Description

ERROR: failed to run scan plugin: packages:
Traceback (most recent call last):
  File "/scancode-toolkit/src/scancode/cli.py", line 1117, in run_codebase_plugins
    plugin.process_codebase(codebase, **kwargs)
  File "/scancode-toolkit/src/packagedcode/plugin_package.py", line 252, in process_codebase
    modified = list(add_referenced_license_matches_for_package(resource, codebase))
  File "/scancode-toolkit/src/packagedcode/licensing.py", line 144, in add_referenced_license_matches_for_package
    detections_added.extend(referenced_resource.license_detections)
AttributeError: 'NoneType' object has no attribute 'license_detections'

How To Reproduce

Reproducible by scanning lzo 2.10 with scancode v32.3.0. Worked before.

docker run -v /home/foo/bar/lzo/src:/project -v /home/foo/bar/foss-licenses/licenseData/scancode:/licenses scancode-toolkit:latest -clpieu -n nproc --strip-root --json /licenses/lzo_2.10.json /project/

@AyanSinhaMahapatra
Copy link
Member

@FaberFlorian thanks for the report, I could reproduce this bug. Will add a fix soon

@AyanSinhaMahapatra AyanSinhaMahapatra self-assigned this Nov 4, 2024
AyanSinhaMahapatra added a commit that referenced this issue Nov 5, 2024
Reference: #3969
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
@AyanSinhaMahapatra AyanSinhaMahapatra linked a pull request Nov 5, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants