Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tkinter not working

279 views
Skip to first unread message

Daniel Lee

unread,
Aug 1, 2022, 1:00:41 PM8/1/22
to
Hello, I my code with tkinter was working before, and now, it has many errors in it. I’m not sure what has happened. The results after running are below:

"D:\Python Projects\tes\venv\Scripts\python.exe" "D:/Python Projects/tes/main.py"
Traceback (most recent call last):
File "D:\Python Projects\tes\main.py", line 1, in <module>
import tkinter as tk
File "C:\Users\Daniel.LAPTOP-6U1MQ9CR\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 3, in <module>
import tkinter.messagebox
File "C:\Users\Daniel.LAPTOP-6U1MQ9CR\AppData\Local\Programs\Python\Python310\lib\tkinter\messagebox.py", line 25, in <module>
from tkinter.commondialog import Dialog
File "C:\Users\Daniel.LAPTOP-6U1MQ9CR\AppData\Local\Programs\Python\Python310\lib\tkinter\commondialog.py", line 13, in <module>
from tkinter import Frame, _get_temp_root, _destroy_temp_root
ImportError: cannot import name 'Frame' from partially initialized module 'tkinter' (most likely due to a circular import) (C:\Users\Daniel.LAPTOP-6U1MQ9CR\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py)

Process finished with exit code 1

Matthew Barnett

unread,
Aug 1, 2022, 2:01:16 PM8/1/22
to
The entry:

File
"C:\Users\Daniel.LAPTOP-6U1MQ9CR\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py",
line 3, in <module>
import tkinter.messagebox

in the traceback does not look right to me. On my PC that file starts
with a long docstring.

2QdxY4Rz...@potatochowder.com

unread,
Aug 1, 2022, 2:28:32 PM8/1/22
to
On 2022-08-01 at 18:53:47 +0100,
My tkinter/__init__.py, too.

Do you have (and did you create since the last time your code worked)
your own module called tkinter? Is line 3 "import tkinter.messagebox"?
0 new messages