You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rdf parser throws an IndexError (IndexError: list index out of range), when trying to parse the RdfExample file for spec version 2.2 from the spdx-spec repo (here).
I've fixed this particular problem but the sample file still causes exceptions due to other bugs. I'm making a pull request to get feedback on whether my way of solving these problems is correct since I'm new to SPDX.
Activity
abhi-kr-2100 commentedon Nov 28, 2022
I've successfully reproduced this error, and currently working to diagnose and fix it.
abhi-kr-2100 commentedon Nov 29, 2022
After some analysis, I've found that the body of the for loop at https://github.com/spdx/tools-python/blob/main/spdx/parsers/rdf.py#L1450 doesn't execute. As a result,
set_ext_doc_id— the function that populatesdoc.ext_document_references— is not run.The for loop at https://github.com/spdx/tools-python/blob/main/spdx/parsers/rdf.py#L1459 does run, but since
doc.ext_document_referencesis empty, it causes anIndexError.I've fixed this particular problem but the sample file still causes exceptions due to other bugs. I'm making a pull request to get feedback on whether my way of solving these problems is correct since I'm new to SPDX.
armintaenzertng commentedon Mar 31, 2023
The example document
SPDXRdfExample-v2.2.spdx.rdf.xmlcan be successfully parsed using the refactored version now found on main.