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

Đang mở
#1,990 1 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

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

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.