1

尽管pypi的文档清楚地说明了

d = popplerqt5.Poppler.Document.load('file.pdf')

这样做会导致以下错误:

TypeError: Document.load(): argument 1 has unexpected type 'str'

我正在使用 Debian 测试。

python3             : 3.4.3-7
python3-pyqt5       : 5.5.1+dfsg-3
libpoppler-qt5-1    : 0.26.5-4
python3-poppler-qt5 : 0.24.2-1+b1

最低工作示例:

>>> from popplerqt5 import Poppler as PDF
>>> doc = PDF.Document.load( "trial.pdf" )
Traceback (most recent call last):
  File "<console>", line 1, in <module>
TypeError: Document.load(): argument 1 has unexpected type 'str'
4

1 回答 1

1

显然这是debian中包的问题。我尝试从源代码编译。这完美无缺。我将向 debian 提交错误报告。

更新: 此问题已在版本中修复0.24.2-1+b2

于 2016-03-16T10:01:48.310 回答