aboutcode-org / aboutcode-org/scancode-toolkit

Unknown Scanner Error for Python Files in packages

Offen
#2,893 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
2.6k
Forks
791
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
5

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.