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 摘要。