aboutcode-org / aboutcode-org/scancode-toolkit

Unknown Scanner Error for Python Files in packages

Abierto
#2,893 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

I scanned our project using ORT which depends on ScanCode.

I get unknown scanner errors referring to serveral Python files e.g.:
Package: `Maven:com.drewnoakes:metadata-extractor:2.16.0`

``
ERROR: for scanner: licenses: ERROR: Unknown error: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/scancode/interrupt.py", line 91, in interruptible return NO_ERROR, func(*(args or ()), **(kwargs or {})) File "/usr/local/lib/python3.8/dist-packages/scancode/api.py", line 175, in get_licenses matches = idx.match( File "/usr/local/lib/python3.8/dist-packages/licensedcode/index.py", line 819, in match qry = query.build_query( File "/usr/local/lib/python3.8/dist-packages/licensedcode/query.py", line 119, in build_query if not T.contains_text: File "/usr/local/lib/python3.8/dist-packages/typecode/contenttype.py", line 618, in contains_text elif self.is_pdf and not self.is_pdf_with_text: File "/usr/local/lib/python3.8/dist-packages/typecode/contenttype.py", line 594, in is_pdf_with_text doc = PDFDocument(parser) File "/usr/local/lib/python3.8/dist-packages/pdfminer/pdfdocument.py", line 701, in __init__ newxref.load(parser) File "/usr/local/lib/python3.8/dist-packages/pdfminer/pdfdocument.py", line 194, in load (_, obj) = parser.nextobject() File "/usr/local/lib/python3.8/dist-packages/pdfminer/psparser.py", line 604, in nextobject (pos, token) = self.nexttoken() File "/usr/local/lib/python3.8/dist-packages/pdfminer/psparser.py", line 518, in nexttoken self.fillbuf() File "/usr/local/lib/python3.8/dist-packages/pdfminer/psparser.py", line 233, in fillbuf raise PSEOF('Unexpected EOF') pdfminer.psparser.PSEOF: Unexpected EOF (File: wiki/docs/ICC1v43_2010-12.pdf)
``

What is reason for this errors and what is the best way to fix these errors?

### How To Reproduce

- Scan sample project with the dependency `com.drewnoakes:metadata-extractor:2.16.0` using ScanCode.
- Run it on GitLab CI.

### System configuration

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

* GitLab Enterprise Edition [14.7.2-ee](https://gitlab.com/gitlab-org/gitlab/-/tags/v14.7.2-ee)
* ORT scanner uses ScanCode 30.1.0

Thank you very much for your help.

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.