menu
Log In
Register
menu
Login
Register
Questions
Hot!
Unanswered
Tags
Users
Ask a Question
About us
Cookie Policy
Home
Questions
How do I correct this error?
arrow_back
How do I correct this error?
by
roma2
asked
Dec 28, 2021
1
vote
How do I correct this error?
I am writing code with tkinter. I made a while loop with Thread. There I made itemconfig.
Error:
RuntimeError: main thread is not in main loop
How do I correct this error?
python
tkinter
Facebook
Twitter
LinkedIn
Reddit
Vk.com
answer
comment
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
4
Answers
by
sergey-gornostaev
answered
Dec 28, 2021
Best answer
0
votes
The GUI libraries, including Tk, are not thread-safe. Consequently, the event loop must be started in the main thread and you cannot directly interact with GUI components from a thread other than the thread in which the event loop is started.
ask related question
comment
0 Comments
Please
log in
or
register
to add a comment.
by
comandante_ktc
answered
Dec 28, 2021
0
votes
You're running your main GUI loop in a thread besides the main thread. You cannot do this.
ask related question
comment
0 Comments
Please
log in
or
register
to add a comment.
by
Bad-Coder
answered
Dec 28, 2021
0
votes
thread.setDaemon(True)
ask related question
comment
0 Comments
Please
log in
or
register
to add a comment.
by
qid00000000
answered
Dec 28, 2021
0
votes
https://stackoverflow.com/questions/14694408/runti...
ask related question
comment
0 Comments
Please
log in
or
register
to add a comment.
Related Question
[1] What CMS to choose?
[2] What technology to use?
[3] How to display numbers in decimal format?
[4] Angular + Zepto = ??
[5] Node.js - child_process - How to specify file type *.doc && *.docx instead of a specific file?
Most popular tags
javascript
php
html
css
python
wordpress
jquery
web development
linux
mysql
android
windows
java
node.js
c#
network
cpp
layout
react
vue
251k
questions
567k
answers
0
comments
287k
users