python - tkinter 回调中的异常:失败,退出代码 3221225781
问题描述
通过将 poppler 添加到我的 PATH 环境变量中,我以某种方式修复了错误代码 127 的先前错误,但是现在我受到了这个新错误的欢迎。有谁知道这可能意味着什么以及如何解决它。我正在尝试运行我在 MAC 上创建的工具,以使用 textract 将 PDF 读取为文本。它在 MacOS 上运行得很好但是它似乎在 Windows 上运行有问题。任何帮助将非常感激。
提前致谢 :)
Exception in Tkinter callback
Traceback (most recent call last):
File "tkinter\__init__.py", line 1883, in __call__
File "\\Mac\Home\PycharmProjects\WickeyEinkaufAutomation\EinkaufRGWindows.py", line 40, in InkoopRekeningen
text = textract.process(str(importfolder) + str(i))
File "site-packages\textract\parsers\__init__.py", line 77, in process
File "site-packages\textract\parsers\utils.py", line 46, in process
File "site-packages\textract\parsers\pdf_parser.py", line 28, in extract
File "site-packages\textract\parsers\pdf_parser.py", line 20, in extract
File "site-packages\textract\parsers\pdf_parser.py", line 43, in extract_pdftotext
File "site-packages\textract\parsers\utils.py", line 100, in run
textract.exceptions.ShellError: The command `pdftotext //Mac/Home/Desktop/WET/Rekeningen/Lekkerkerker_ - 20803471.pdf -` failed with exit code 3221225781
------------- stdout -------------
b''------------- stderr -------------
b''
解决方案
MacOS 和 Windows 上的路径使用不同的斜杠,因此 MacOS 程序也需要更改才能在 Windows 上运行。Mac 使用 / 斜杠,而 Windows - .
推荐阅读
- webpack - 在 Webpack 中包含 Javascript
- sql - 如何将 SQL Server 中的交叉应用转换为 Teradata
- python - 添加的图层必须是图层类的实例。找到:Tensor("conv1d_12/Relu:0", shape=(?, 41, 64), dtype=float32)
- blockchain - 通过智能合约交易资产
- qt - 将图像放在 QFrame 中
- spring-integration - 如何在spring集成流程中注入threadlocal中的变量
- unity3d - 为什么 Flutter 与 Unity 和 AR Vuforia 的集成使得没有对象出现?
- angular - Angular Directive - 如何添加锚点并将 routerlink 设置为 dom 元素
- sql-server - 使用值和顺序标准拆分字符串
- vba - 从 VBA 运行 VBS 脚本 - 无法识别的数据库格式