comtypes icon indicating copy to clipboard operation
comtypes copied to clipboard

Attempting to import comtypes.util raises RuntimeError

Open DManowitz opened this issue 1 year ago • 3 comments

When I try to import comtypes.util, I get the following message:

  File "<stdin>", line 1, in <module>
  File "...\lib\site-packages\comtypes\util.py", line 59, in <module>
    _byref_pointer_offset = _calc_offset()
  File "...\lib\site-packages\comtypes\util.py", line 48, in _calc_offset
    raise RuntimeError("PyCArgObject field definitions incorrect")
RuntimeError: PyCArgObject field definitions incorrect

This error occurs with comtypes 1.1.14 using Python 3.7 or 3.8.

DManowitz avatar Jan 02 '23 23:01 DManowitz

It is almost same as https://github.com/enthought/comtypes/issues/446#issuecomment-1369296042 except that the module it deals with is comtypes.util and it has been 15 years since the last change.

Any opinions also would be appreciated.

junkmd avatar Jan 03 '23 00:01 junkmd

I didn't see such issue before. @DManowitz which exact Python 3.7 and 3.8 versions are used?

vasily-v-ryabov avatar Jan 03 '23 18:01 vasily-v-ryabov

And how about other Python versions like 3.10?

vasily-v-ryabov avatar Jan 03 '23 18:01 vasily-v-ryabov