From 7fd281d6d59a35ae97fac1fb07aaff1fed7a4e5c Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 23 Jun 2025 13:52:45 -0700 Subject: [PATCH 1/2] Catch NotImplementedError Signed-off-by: Jono Yang --- scanpipe/pipes/purldb.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scanpipe/pipes/purldb.py b/scanpipe/pipes/purldb.py index 98224728f9..fd35b3c147 100644 --- a/scanpipe/pipes/purldb.py +++ b/scanpipe/pipes/purldb.py @@ -318,8 +318,12 @@ def get_unique_unresolved_purls(project): try: vers = range_class.from_native(extracted_requirement) - except (InvalidVersionRange, InvalidVersion) as exception: - if exception is InvalidVersionRange: + except ( + InvalidVersionRange, + InvalidVersion, + NotImplementedError, + ) as exception: + if exception in (InvalidVersionRange, NotImplementedError): description = "Version range is invalid or unsupported" else: description = "Extracted requirement is not a valid version" From b30e7c2af73f914ff7c2a1fd78c042644fc3ff28 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Mon, 23 Jun 2025 15:47:08 -0700 Subject: [PATCH 2/2] Update CHANGELOG.rst Signed-off-by: Jono Yang --- CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c47a0126e7..2e9087bb55 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -36,6 +36,10 @@ v35.0.0 (2025-06-23) - Add "Package Compliance Alert" chart in the Policies section. https://github.com/aboutcode-org/scancode.io/pull/1699 +- Catch ``NotImplementedError`` in ``get_unique_unresolved_purls`` and properly + log error in project. + https://github.com/aboutcode-org/scancode.io/pull/1700 + v34.11.0 (2025-05-02) ---------------------