aboutcode-org / aboutcode-org/scancode-toolkit

pdfminer.psparser.PSEOF: Unexpected EOF

Abierto
#2,579 0 comentarios 1 reacción 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

`pdfminer.psparser.PSEOF: Unexpected EOF`

```
Traceback (most recent call last):
File "", line 1, in
File "lib/python3.9/site-packages/scancode/api.py", line 49, in get_copyrights
for dtype, value, start, end in detect_copyrights(location, deadline=deadline):
File "lib/python3.9/site-packages/cluecode/copyrights.py", line 74, in detect_copyrights
numbered_lines = numbered_text_lines(location, demarkup=demarkup)
File "lib/python3.9/site-packages/textcode/analysis.py", line 95, in numbered_text_lines
if T.is_pdf and T.is_pdf_with_text:
File "lib/python3.9/site-packages/typecode/contenttype.py", line 594, in is_pdf_with_text
doc = PDFDocument(parser)
File "/Volumes/nexB/repos/scancode.io/lib/python3.9/site-packages/pdfminer/pdfdocument.py", line 578, in __init__
xref.load(parser)
File "lib/python3.9/site-packages/pdfminer/pdfdocument.py", line 190, in load
(_, obj) = parser.nextobject()
File "lib/python3.9/site-packages/pdfminer/psparser.py", line 567, in nextobject
(pos, token) = self.nexttoken()
File "lib/python3.9/site-packages/pdfminer/psparser.py", line 493, in nexttoken
self.fillbuf()
File "lib/python3.9/site-packages/pdfminer/psparser.py", line 221, in fillbuf
raise PSEOF('Unexpected EOF')
pdfminer.psparser.PSEOF: Unexpected EOF
```
### How To Reproduce

Using the following file: https://gitlab.com/gitlab-org/gitlab/-/blob/master/workhorse/testdata/file-%C3%A4.pdf
```
from scancode.api import get_copyrights
get_copyrights("file-ä.pdf")
```

### System configuration

Python 3.9 ScanCode-toolkit 21.6.7

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.