aboutcode-org / aboutcode-org/scancode-toolkit

Loading licenses should indicate `licensedcode-data` is not installed

Đang mở
#5,053 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

For me, the default installation with

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

would break the following snippet:

```python
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 https://github.com/aboutcode-org/scancode-toolkit/discussions/5052#discussioncomment-16992570_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.