aboutcode-org / aboutcode-org/scancode-toolkit

Unknown Scanner Error for Python Files in packages

オープン
#2,893 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
5

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。