comtypes
comtypes copied to clipboard
Python2/3 difference at DLL load
Hi,
I've different comportement of comtypes on several computers. Same windows, same pycharm.
At the beginning, i was thinking about an environment problem, but in all cases, it works with Py2 and not for Py3. So there is a difference. Py2 and Py3 use the same comtypes version. The "gen" package generate files but not the sames.
1st PC: win7 pro SP1, last pycharm, winpython 3.6.1.0QT5 => KO 1st PC: win7 pro SP1, last pycharm, winpython 2.7.10.3 => OK 2nd PC: win 7 pro SP1, last pycharm, winpython 3.6.1.0QT5 => sometimes work 2nd PC: win 7 pro SP1, last pycharm, winpython 2.7.10.3 => OK
Perhaps someone has an idea?
More informations on my issue. I try also with Py3.6 install on my OS. And the difference, on comportement is that i have folllowing message on Py3, but not on Py2:
Traceback (most recent call last): File "C:/DVP/cmx09/cmx_09_device.py", line 99, in connect self.cmx09_device = CreateObject("VTEXDsa.VTEXDsa") File "C:\Python36\lib\site-packages\comtypes-1.1.3-py3.6.egg\comtypes\client_init.py", line 238, in CreateObject obj = comtypes.CoCreateInstance(clsid, clsctx=clsctx, interface=interface) File "C:\Python36\lib\site-packages\comtypes-1.1.3-py3.6.egg\comtypes_init.py", line 1223, in CoCreateInstance _ole32.CoCreateInstance(byref(clsid), punkouter, clsctx, byref(iid), byref(p)) File "_ctypes/callproc.c", line 918, in GetResult OSError: [WinError -2147024770] Le module spécifié est introuvable