aboutcode-org / aboutcode-org/scancode-toolkit

VirtualCodebase is showing error results when some files are having the "fingerprint"(or any other extra attribute,in excess to other files) attribute in it

未关闭
#1,990 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
2.6k
派生
791
平均合并
1 天 12 小时
30 天内合并 PR
5

描述

### Description

Hello all,
When I was scanning a json file using the scancode ,I was receiving few errors.
This is the [json file](https://drive.google.com/open?id=1lY0wctipt5YUxE10lJxq7pHnE5h78LTp) which I was testing
using the command
`scancode --from-json scan_1_file_moved_new.json --json-pp -`
The following is the errors I received
```
Setup plugins...
Collect file inventory...
Removing temporary files...done.
Usage: scancode [OPTIONS] ...
Try 'scancode --help' for help on options and arguments.

Error: Invalid value: ERROR: failed to collect codebase at: 'scan_1_file_moved_new.json'
Traceback (most recent call last):
File "/home/pratik/scancode-toolkit/src/scancode/cli.py", line 871, in run_scan
max_in_memory=max_in_memory
File "/home/pratik/scancode-toolkit/src/scancode/resource.py", line 1409, in __init__
self._populate(scan_data)
File "/home/pratik/scancode-toolkit/src/scancode/resource.py", line 1620, in _populate
resource = self._create_resource(name, parent, is_file, path, resource_data)
File "/home/pratik/scancode-toolkit/src/scancode/resource.py", line 528, in _create_resource
**resource_data
TypeError: __init__() got an unexpected keyword argument 'fingerprint'

```
This error is because of the presence of the "fingerprint" attribute in the files.

### System configuration
Ubuntu 18.04 ,Python3.6.9 64 bit

* What OS are you running on? (Windows/MacOS/Linux) Linux
* What version of scancode-toolkit was used to generate the scan file?3.1.2,the json file was scanned using `"scancode_version": "2.2.1.post73.a9083191a"`
* What installation method was used to install/run scancode? (pip/source download/other)source download

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。