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
Hi there, if any relationships contain a NOASSERTION relationship, represented by the object SpdxNoAssertion(), then there will be a failure to write to file
File "path/to/lib/spdx_tools/spdx/writer/tagvalue/tagvalue_writer_helper_functions.py", line 89, in scan_relationships
and relationship.related_spdx_element_id in files_by_spdx_id.keys()
TypeError: unhashable type: 'SpdxNoAssertion'
The current work around I found is changing the if statements in scan_relationships to the following (lines 87-89)
if (
relationship.relationship_type == RelationshipType.CONTAINS
and relationship.spdx_element_id in packages_spdx_ids
and str(relationship.related_spdx_element_id) in files_by_spdx_id.keys()
):
Alternatively for a user side fix, replace your SpdxNoAssertion with "NOASSERTION" in any relationship or str(SpdxNoAssertion())
Also, I just want to voice some disappointment in the complete lack of backwards compatibility in the 0.7.1->0.8.0 upgrade. I appreciate this very useful tool and the work the developers do, but when it takes as much time to fix my old script that was working as it would to just manually write and SPDX document by hand, it is very frustrating for me as a user. I hope you consider more backwards compatibility in future major patches. Thanks!
The text was updated successfully, but these errors were encountered:
Hi @nathanjacobiOXOS, thanks for using the spdx-tools!
The issue you describe has been fixed in #778. Unfortunately, we didn't have a release since then. It's high time for a new release, it seems! :)
Regarding your disappointment, we are truly sorry for the inconvenience. The decision to drop backwards compatibility was not made lighthearted, but ultimately the hope was to have a stronger foundation in the code base going forward with the tools.
Hi there, if any relationships contain a NOASSERTION relationship, represented by the object SpdxNoAssertion(), then there will be a failure to write to file
The current work around I found is changing the if statements in scan_relationships to the following (lines 87-89)
Alternatively for a user side fix, replace your SpdxNoAssertion with "NOASSERTION" in any relationship or str(SpdxNoAssertion())
Also, I just want to voice some disappointment in the complete lack of backwards compatibility in the 0.7.1->0.8.0 upgrade. I appreciate this very useful tool and the work the developers do, but when it takes as much time to fix my old script that was working as it would to just manually write and SPDX document by hand, it is very frustrating for me as a user. I hope you consider more backwards compatibility in future major patches. Thanks!
The text was updated successfully, but these errors were encountered: