Python poppler Qt5 文档加载错误

标签 python qt5 poppler

尽管文档位于 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'

最佳答案

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

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

中修复

关于Python poppler Qt5 文档加载错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33993684/

相关文章:

python - 无法在 redshift 中的表上写入

c++ - 使用 Qt 5.2 静态库编译时在 Windows 上加载 Qt 应用程序时出错

c++ - 使用 wrld.js 时 QWebEngineView "Access-Control-Allow-Headers"错误

qt5 - raspberry2 上的eglfs -- * 未能添加服务 - 已在使用中?

qt - 如何在我的应用程序中使用 Poppler-QML-plugin?

python - PyS60 是否有可靠的垃圾收集?

python - asyncio python 3.6 代码到 asyncio python 3.4 代码

Python 每 5 分钟执行一次操作

linux - 开罗,支持 pdf

python - 将多个像素图显示到滚动区域的最有效方法是什么?