aboutcode-org / aboutcode-org/scancode-toolkit

MemoryError when scanning 100 MiB single-line JSON file

Abierto
#958 14 comentarios 0 reacciones 0 asignados Ver en GitHub
bug Priority: low
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

Slightly related to #616 (which is about the json2csv tool), I also see an error when scanning a (close to) 100 MiB JSON file with ScanCode version 2.2.1.post277.4d68f9377, on both Linux and Windows. I'm wondering whether ScanCode is still trying to interpret the JSON instead of handling it as a BLOB despite my not specifying the `--package` option, and whether that's causing the huge memory usage.

My full command line is

scancode --copyright --license --license-text --info --only-findings --strip-root --timeout 300 --processes 15 /dir/to/scan --json-pp result.json

Answering @pombredanne's question from #616:

> JSON should not be treated as plain data when this is compact, single line.
> Is this file a single line, like a huge js.map map file?

Yes, it is.

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.