在将服务器上运行的python项目移植部署到本地的时候遇到的问题:
Traceback (most recent call last):
File "D:/p/Service/TransH/test_transh.py", line 9, in <module>
con = config.Config()
File "D:\p\Service\TransH\config\Config.py", line 16, in __init__
self.lib = ctypes.cdll.LoadLibrary(base_file)
File "C:\Users\junruit\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 426, in LoadLibrary
return self._dlltype(name)
File "C:\Users\junruit\AppData\Local\Programs\Python\Python36\lib\ctypes\__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。
提示:python我win10 x64 装了64位的python,不能有效load32位的dll,换成32位的python就好了。