aboutcode-org / aboutcode-org/scancode-toolkit

Inconsistent License cache: rebuilding index.

Ouverte
#3,156 19 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Python
Étoiles
2.6k
Forks
791
Merge moyen
1 j 12 h
PR mergées (30 j)
5

Description

### 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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.