Skip to content

Bug: AttributeError: 'LicenseWithExceptionSymbol' object has no attribute 'key' #137

@elizabethmcnish

Description

@elizabethmcnish

Before You Begin

Before proceeding, please make sure to follow these steps:

  • I have checked for similar issues in the project's issue tracker.
  • I have searched closed issues to see if a similar problem was reported
    before.

Issue Details

Licensecheck is suddenly failing for one of our requirements.txt files, with:

AttributeError: 'LicenseWithExceptionSymbol' object has no attribute 'key'

We have neither updated this file or licensecheck itself recently.

Description

This has just suddenly started happening. We have neither updated this file or licensecheck itself recently.
This error is resolved when we comment out the following libraries:

shap, particles, numba, llvmlite

These libraries have existed in the requirements.txt for many months.

Possible issue (from ChatGPT):
One (or more) of these packages has an SPDX-style license with a WITH exception in its metadata (or something else that makes license-expression return a LicenseWithExceptionSymbol).

licensecheck is assuming every symbol has a .key attribute, which is not true for LicenseWithExceptionSymbol, so it dies.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions