dshikashio / Pybag

Python module for Windbg's dbgeng plus additional wrappers.
MIT License
56 stars 15 forks source link

Incompatible with comtypes 1.4.5 #22

Closed atericparker closed 2 months ago

atericparker commented 2 months ago

Throws the following error on import with the latest version of comtypes `c) Microsoft Corporation. All rights reserved. C:\Users\lain>python Python 3.12.4 (tags/v3.12.4:8e8a4ba, Jun 6 2024, 19:30:16) [MSC v.1940 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import pybag Traceback (most recent call last): File "", line 1, in File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\init.py", line 57, in from .pydbg import DbgEng File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\pydbg.py", line 11, in from .dbgeng.idebugclient import DebugClient File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\dbgeng\idebugclient.py", line 8, in from .idebugcontrol import DebugControl File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\dbgeng\idebugcontrol.py", line 10, in from comtypes import compointerbase ImportError: cannot import name '_compointer_base' from 'comtypes' (C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\comtypes\init.py) from pybag import * Traceback (most recent call last): File "", line 1, in File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\init.py", line 57, in from .pydbg import DbgEng File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\pydbg.py", line 11, in from .dbgeng.idebugclient import DebugClient File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\dbgeng\idebugclient.py", line 8, in from .idebugcontrol import DebugControl File "C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\pybag\dbgeng\idebugcontrol.py", line 10, in from comtypes import compointerbase ImportError: cannot import name '_compointer_base' from 'comtypes' (C:\Users\lain\AppData\Local\Programs\Python\Python312\Lib\site-packages\comtypes\init.py)`

Appears this was the breaking change https://github.com/enthought/comtypes/commit/cc6edaf4e5cfd018c45e5df4a463ce8b17ff7843

Works fine if we downgrade to 1.4.4

atericparker commented 2 months ago

Fixed by https://github.com/dshikashio/Pybag/commit/3b2751e4f4d5041eb5ca38b0d4c63f1d2d34ec46

dshikashio commented 2 months ago

Thanks for the info - 2.2.12 has the changes.