Skip to content

Inconsistent License cache: rebuilding index. #3156

@Gator8

Description

@Gator8

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions