aboutcode-org / aboutcode-org/scancode-toolkit

Scan Result in error (JSONLINES)

Abierto
#3,420 2 comentarios 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

> Please leave a brief description of the bug or feature request:
When scan finished on the entire repo, we have got an error that shows the following:
```
Filter scans...
Filter scan: licenses...
Filter scan: copyrights...
Save scan results...
Save scan results as: jsonlines...
ERROR: failed to run output plugin: jsonlines:
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.10/site-packages/click/utils.py", line 152, in open
rv, self.should_close = open_stream(
File "/home/runner/.local/lib/python3.10/site-packages/click/_compat.py", line 404, in open_stream
return _wrap_io_open(filename, mode, encoding, errors), True
File "/home/runner/.local/lib/python3.10/site-packages/click/_compat.py", line 379, in _wrap_io_open
return open(file, mode, encoding=encoding, errors=errors)
IsADirectoryError: [Errno 21] Is a directory: 'scan'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/runner/.local/lib/python3.10/site-packages/scancode/cli.py", line 1081, in run_codebase_plugins
plugin.process_codebase(codebase, **kwargs)
File "/home/runner/.local/lib/python3.10/site-packages/formattedcode/output_jsonlines.py", line 47, in process_codebase
output_json_lines.write(
File "/home/runner/.local/lib/python3.10/site-packages/click/utils.py", line 137, in __getattr__
return getattr(self.open(), name)
File "/home/runner/.local/lib/python3.10/site-packages/click/utils.py", line 158, in open
raise FileError(self.name, hint=e.strerror) from e
click.exceptions.FileError: Is a directory

Scanning done.
Summary: licenses, copyrights with 1 process(es)
Errors count: 0
Scan Speed: 4.30 files/sec.
Initial counts: 3048 resource(s): 2068 file(s) and 980 directorie(s)
Final counts: 3048 resource(s): 2068 file(s) and 980 directorie(s)
Timings:
scan_start: 2023-06-01T150512.741215
scan_end: 2023-06-01T151317.813026
setup_scan:licenses: 3.35s
setup: 3.35s
inventory: 0.59s
scan:licenses: 0.26s
scan: 480.58s
total: 485.18s
Removing temporary files...done.
```

### How To Reproduce

> Tell us how to reproduce the issue.

scancode -clv --json-lines scan $GITHUB_WORKSPACE

### System configuration

> For bug reports, it really helps us to know:

* What OS are you running on? (Windows/MacOS/Linux)
* What version of scancode-toolkit was used to generate the scan file?
* What installation method was used to install/run scancode? (pip/source download/other)

Running via Github actions, running on ubuntu 20.04 runner
toolkit version: 32.0.2

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.