【问题标题】:Python poppler Qt5 Document load errorPython poppler Qt5 文档加载错误
【发布时间】:2015-11-30 07:46:42
【问题描述】:

虽然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'

【问题讨论】:

    标签: python qt5 poppler


    【解决方案1】:

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

    更新: 这个问题已经在0.24.2-1+b2版本中修复了

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-04-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多