【发布时间】:2021-08-04 23:37:03
【问题描述】:
我已确认:MSFTTCJTAG.dll 存在于 C:\ddey_documents 中。加载时遇到问题。有什么帮助吗?
import os
from ctypes import *
os.chdir(r'c:\ddey_documents')
Flywatter2 = WinDLL(r"C:\ddey_documents\MSFTFTCJTAG.dll")
错误:
File "C:\Python39\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'C:\ddey_documents\MSFTFTCJTAG.dll' (or one of its dependencies). Try using the full path with constructor syntax.
我尝试过的事情:
-
尝试在没有帮助的情况下添加以下内容:
os.add_dll_directory(r"C:\ddey_documents) -
最初出现以下错误,
OSError: [WinError 193] %1 is not a valid Win32 application.它通过应用以下两个步骤得到修复:
【问题讨论】:
-
使用stackoverflow.com/a/28304716/5769463查看你的dll的依赖并确保它们可以被找到。