I'm using easygui in a Python app and then generate an .exe with PyInstaller.
Everything works fine in my computer, but my colleague get this weird error when they try to run the app :
Traceback (most recent call last):
File "easygui\boxes\button_box.py", line 95, in buttonbox
File "easygui\boxes\button_box.py", line 147, in __init__
File "easygui\boxes\button_box.py", line 268, in __init__
File "tkinter\font.py", line 23, in nametofont
File "tkinter\font.py", line 86, in __init__
RuntimeError: main thread is not in main loop
The line where easygui is called is simply
choice = easygui.buttonbox(
"msg", "title", choices=["choice1", "choice2"],
default_choice="choice1", cancel_choice="choice2"
)
so the problem seems to be with the font but I'm not using anything particular in easygui ? I've searched for issues on the easygui's Git but couldn't find anything
Also, there was another easygui.buttonbox
earlier in the process but this one did show up properly so I'm just really confused.
Thanks!
CodePudding user response:
The solution was to show the msgbox in the main thread. It crashed because the msgbx was in a different thread than the main one