aboutcode-org / scancode-toolkit

:mag: ScanCode detects licenses, copyrights, dependencies by "scanning code" ... to discover and inventory open source and third-party packages used in your code. Sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase, the Google Summer of Code, Azure credits, nexB and others generous sponsors!
https://aboutcode.org/scancode/
2.13k stars 551 forks source link

Scan error when scanning partial ABOUT file #2745

Open pombredanne opened 3 years ago

pombredanne commented 3 years ago

The --package scan of a file name foo.ABOUT with: download_url: https://raw.githubusercontent.com/docker/docker/ff2de8dace1ba1c1f5e8542790ef5cd564375934/image/spec/v1.1.md fails to scan with:

        scan_errors:
            - |
                ERROR: for scanner: packages:
                ERROR: Unknown error:
                Traceback (most recent call last):
                  File "/scancode-toolkit-master2/src/scancode/interrupt.py", line 91, in interruptible
                    return NO_ERROR, func(*(args or ()), **(kwargs or {}))
                  File "/scancode-toolkit-master2/src/scancode/api.py", line 344, in get_package_manifests
                    return dict(package_manifests=[
                  File "/scancode-toolkit-master2/src/scancode/api.py", line 345, in <listcomp>
                    package_manifests.to_dict()
                AttributeError: 'NoneType' object has no attribute 'to_dict'
pombredanne commented 3 years ago

Using the latest develop branch