You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to extract the pages from this file, I'm having following error :
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/encodingdb.py", line 27, in name2unicode
name = name.split('.')[0]
TypeError: a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/high_level.py", line 149, in extract_pages
interpreter.process_page(page)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 895, in process_page
self.render_contents(page.resources, page.contents, ctm=ctm)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 908, in render_contents
self.execute(list_value(streams))
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 933, in execute
func(*args)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 872, in do_Do
ctm=mult_matrix(matrix, self.ctm))
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 906, in render_contents
self.init_resources(resources)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 354, in init_resources
self.fontmap[fontid] = self.rsrcmgr.get_font(objid, spec)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 190, in get_font
font = PDFType3Font(self, spec)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdffont.py", line 647, in __init__
PDFSimpleFont.__init__(self, descriptor, widths, spec)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/pdffont.py", line 575, in __init__
self.cid2unicode = EncodingDB.get_encoding(name, diff)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/encodingdb.py", line 108, in get_encoding
cid2unicode[cid] = name2unicode(x.name)
File "/home/remondn/.venv/stable_prospector/lib/python3.6/site-packages/pdfminer/encodingdb.py", line 27, in name2unicode
name = name.split('.')[0]
TypeError: a bytes-like object is required, not 'str'
Environment
OS : Ubuntu 18.04.4 LTS (Bionic Beaver)
Python version : 3.6.9
pdfminer version : 20200726
How can I run extract_pages() without having this error ?
The text was updated successfully, but these errors were encountered:
File
aa.pdf
Description
When trying to extract the pages from this file, I'm having following error :
Code
Full stack-trace
Environment
pdfminer
version : 20200726How can I run
extract_pages()
without having this error ?The text was updated successfully, but these errors were encountered: