Issue
I am getting an error whenever I try to import the tkinter module. I'm using Python 3.4 so the capital T isn't an issue.
from tkinter import *
root = Tk()
root.mainloop()
It throws back an error like:
Traceback (most recent call last):
File "<string>", line 420, in run_nodebug
File "<module1>", line 11, in <module>
File "C:\Python34\lib\tkinter\__init__.py", line 3372
t self.tk.call(('image', 'create', imgtype, name,) + options)
^
SyntaxError: invalid syntax
Thanks for the help!
Solution
The problem seems to be somehow existing in the init file itself. Just go to the file in your pc.
C:\Python34\lib\tkinter\__init__.py
Edit that init.py with Idle or whatever IDE you use. Next go to the line number 3372 and remove that unwanted character 't' from the line
t self.tk.call(('image', 'create', imgtype, name,) + options)
It'll do the work for you.
Answered By - Jay Patel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.