Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tk is not defined
#9
(Jan-08-2022, 08:29 AM)buran Wrote: Don't name your file tkinter.py It shadows the tkinter module you want to use.

This helped me. Thanks! I didn't name my file tkinter.py but I had made one previously.
Then my other programs that used tkinter stopped working because of that tkinter.py that was located in the common python folder I was using.
duh!! I can't believe that I made such a dumb mistake. Here I was uninstalling and reinstalling tkinter over and over trying to fix the problem but the only problem was that I had made a local tkinter.py that was being imported instead of python importing the real tkinter.
aye aye aye! Cool
Gribouillis likes this post
Reply


Messages In This Thread
tk is not defined - by jip31 - Jan-08-2022, 07:55 AM
RE: tk is not defined - by buran - Jan-08-2022, 08:29 AM
RE: tk is not defined - by jip31 - Jan-09-2022, 06:38 AM
RE: tk is not defined - by tralfazy - Aug-03-2023, 05:01 PM
RE: tk is not defined - by Gribouillis - Jan-08-2022, 08:43 AM
RE: tk is not defined - by Larz60+ - Jan-08-2022, 09:28 AM
RE: tk is not defined - by jip31 - Jan-09-2022, 06:53 AM
RE: tk is not defined - by Gribouillis - Jan-09-2022, 07:43 AM
RE: tk is not defined - by jip31 - Jan-12-2022, 05:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python library not defined in user defined function johnEmScott 2 3,974 May-30-2020, 04:14 AM
Last Post: DT2000

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020