aboutcode-org / aboutcode-org/scancode-toolkit

Unknown Scanner Error for Python Files in packages

未關閉
#2,893 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Python
星號
2.6k
分支
791
平均合併
1 天 12 小時
30 天內合併 PR
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 摘要。