Diego Vélez Torres
2015-05-16 17:49:12 UTC
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,
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
***@gmail.com
Teléfono: 098 28 57 58
Cuenca, Ecuador
Diego Vélez Torres
***@gmail.com
Teléfono: 098 28 57 58
Cuenca, Ecuador