Skip to content

Loading licenses should indicate licensedcode-data is not installed #5053

Description

@AyanSinhaMahapatra

For me, the default installation with

pip install --no-cache scancode-toolkit==33.0.0rc1 --index-url https://pypi.org/simple

would break the following snippet:

from licensedcode.models import load_licenses_from_multiple_dirs, licenses_data_dir

load_licenses_from_multiple_dirs(
    builtin_license_data_dir=licenses_data_dir,
    additional_license_data_dirs=[],
    with_deprecated=False,
)

Output:

licensedcode.models.InvalidLicense: No licenses were loaded. Check to see if the license data files are available at "/home/user/lib/python3.11/site-packages/licensedcode/data/licenses".

Installing licensedcode-data solved this, but given the description, it seems like it should have been installed automatically.

Originally posted by @stefan6419846 in #5052 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions