[python-win32] Issues with tkinter, COM servers and Python 3.x

Diego Vélez Torres divelez69 at gmail.com
Sat May 16 19:49:12 CEST 2015


Hi:

I'm having issues with tkinter, COM servers and Python 3.4.   I can't call
tkinter inside a COM server.   I tried many examples of tkinter, but every
time I try to init a tkniter instance (  tk = tkinter.Tk()  )  inside a
running COM server, the same following error arises:

'''
....
....
 tk = Tk()
  File "C:\Python34\Lib\tkinter\__init__.py", line 1851, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive,
wantobjects, useTk, sync, use)
TypeError: must be str, not bytes
'''
Of course the Traceback is much larger, but I intentionally posted the same
5 last lines in order to show where in the __init__ file raises the error.
I have tried outside the COM server the same tkinter examples and they work
perfectly.

However, this is not the case with Python 2.7.9.  All tkinter examples work
perfectly inside and outside the COM server.

I've intensely searched in the web about this specific subject with no luck.

Question:  Is perhaps needed some setup in order to use tkinter inside a
COM server while in Python 3.x?   ...or this may be a bug specifically of
Python 3.4?

Best regards,

-- 
Diego Vélez Torres
divelez69 at gmail.com
Teléfono: 098 28 57 58
Cuenca, Ecuador
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20150516/bee6ab23/attachment.html>


More information about the python-win32 mailing list