aboutcode-org / aboutcode-org/scancode-toolkit

Unknown Scanner Error for Python Files in packages

Ouverte
#2,893 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Python
Étoiles
2.6k
Forks
791
Merge moyen
1 j 12 h
PR mergées (30 j)
5

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.