• Tkinter not working

    From Daniel Lee@21:1/5 to All on Mon Aug 1 12:17:09 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthew Barnett@21:1/5 to Daniel Lee on Mon Aug 1 18:53:47 2022
    On 01/08/2022 13:17, Daniel Lee wrote:
    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

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 2QdxY4RzWzUUiLuE@potatochowder.com@21:1/5 to Matthew Barnett on Mon Aug 1 13:27:55 2022
    On 2022-08-01 at 18:53:47 +0100,
    Matthew Barnett <mrabarnett@mrabarnett.plus.com> wrote:

    On 01/08/2022 13:17, Daniel Lee wrote:
    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

    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.

    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"?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)