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 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。