mmm拇
2016-10-16 18:25
pdfminer3k的安装应该是没问题的,最后显示的跟老师视频上一样的:
Finished processing dependencies for pdfminer3k==1.3.1
但是按照后来验证的操作,尝试了几次还是报错。
我的是2.7 然后是 mac OS ,是因为版本问题吗?求解答,谢谢!!
报错内容:
Traceback (most recent call last):
File "pdf2txt.py", line 6, in <module>
from pdfminer.pdfinterp import PDFResourceManager, process_pdf
File "/Library/Python/2.7/site-packages/pdfminer3k-1.3.1-py2.7.egg/pdfminer/pdfinterp.py", line 5, in <module>
from .cmapdb import CMapDB, CMap
File "/Library/Python/2.7/site-packages/pdfminer3k-1.3.1-py2.7.egg/pdfminer/cmapdb.py", line 23, in <module>
from .psparser import PSStackParser
File "/Library/Python/2.7/site-packages/pdfminer3k-1.3.1-py2.7.egg/pdfminer/psparser.py", line 4, in <module>
from .utils import choplist
File "/Library/Python/2.7/site-packages/pdfminer3k-1.3.1-py2.7.egg/pdfminer/utils.py", line 212, in <module>
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
File "/Library/Python/2.7/site-packages/pdfminer3k-1.3.1-py2.7.egg/pdfminer/utils.py", line 180, in <genexpr>
PDFDocEncoding = ''.join( chr(x) for x in (
ValueError: chr() arg not in range(256)
我的win10和你的情况一样
应该是版本问题,2.7和3之后的版本在某些包的导入上都有区别
python遇见数据采集
59669 学习 · 200 问题
相似问题