comtypes icon indicating copy to clipboard operation
comtypes copied to clipboard

error of lib itself

Open adiee5 opened this issue 3 years ago • 1 comments

when i run script itself it says:

File "D:\disSzczur\srakammmm\lib\site-packages\comtypes\__init__.py", line 1020, in <module>
    class helpstring(unicode):
NameError: name 'unicode' is not defined

could someone help?

adiee5 avatar Jan 06 '22 21:01 adiee5

Got the same issue~ I'm using python 3.9

  File "C:\python39\lib\site-packages\comtypes\__init__.py", line 1020, in <module>
    class helpstring(unicode):
NameError: name 'unicode' is not defined

Fixed:

It's because the pip installed comtypes not compatible,so I use setup tools to install it and before install it ,remember upgrade the code to python3,I use 2to3 to upgrade.

2to3 . -w
python setup.py build
python setup.py install

YoungMan3281 avatar Jan 07 '22 07:01 YoungMan3281

@adiee5 @YoungMan3281

comtypes==1.1.11 has been added the bridge to resolve them.

https://github.com/enthought/comtypes/blob/30523b53fbd5560d5bde2e722607c860cdf743dd/comtypes/init.py#L98-L101 If the issue remains, please re-open.

junkmd avatar Nov 26 '22 01:11 junkmd