aboutcode-org / aboutcode-org/scancode-toolkit

Inconsistent License cache: rebuilding index.

Đang mở
#3,156 19 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
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ả

### Description

Recently upgraded to 31.2.1 from 30.1, this has started happening on a much more frequent basis. So much so that I've had to disable these scans until the issue is resolved. Looks like the file scan runs fine, but when it tries to scan licenses, I get this error:

14:53:16 Inconsistent License cache: rebuilding index.
14:53:16 ERROR: Failed to load license cache (the file may be corrupted ?).
14:53:16 Please delete "C:\tools\scancode-toolkit-v31.2.1\venv\lib\site-packages\licensedcode\data\cache\license_index\index_cache" and retry.
14:53:16 If the problem persists, copy this error message and submit a bug report at https://github.com/nexB/scancode-toolkit/issues/
14:53:16 Traceback (most recent call last):
14:53:16 File "C:\tools\scancode-toolkit-v31.2.1\venv\lib\site-packages\licensedcode\cache.py", line 338, in load_cache_file
14:53:16 return pickle.load(lfc)
14:53:16 File "C:\tools\scancode-toolkit-v31.2.1\venv\lib\site-packages\attr\_make.py", line 958, in slots_setstate
14:53:16 def slots_setstate(self, state):
14:53:16 Exception
14:53:16
14:53:16 The above exception was the direct cause of the following exception:
14:53:16
14:53:16 Traceback (most recent call last):
14:53:16 File "C:\tools\scancode-toolkit-v31.2.1\venv\lib\site-packages\licensedcode\cache.py", line 84, in load_or_build
14:53:16 return load_cache_file(cache_file)
14:53:16 File "C:\tools\scancode-toolkit-v31.2.1\venv\lib\site-packages\licensedcode\cache.py", line 346, in load_cache_file
14:53:16 raise Exception(msg) from e
14:53:16 Exception: ERROR: Failed to load license cache (the file may be corrupted ?).
14:53:16 Please delete "C:\tools\scancode-toolkit-v31.2.1\venv\lib\site-packages\licensedcode\data\cache\license_index\index_cache" and retry.
14:53:16 If the problem persists, copy this error message and submit a bug report at https://github.com/nexB/scancode-toolkit/issues/

Judging by the timestamp on the left and the fact that it takes 10 minutes to rebuild the cache from the command line, there is never any attempt to rebuild the cache.

### How To Reproduce

I'm not sure how easy it is to reproduce.

C:\tools\scancode-toolkit-v31.2.1\scancode -clpi -n 8 [BUNCH OF IGNORES] --strip-root --only-findings --verbose --json-pp %1.json --spdx-rdf %2.spdx %3

### System configuration

Windows 10
Scancode 31.2.1
zip file downloaded from github.

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.