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

Abierto
#1,990 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.