Problem with tkinter on raspberry pi

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Problem with tkinter on raspberry pi

Post by /RaspberryPi »

I wrote a small program that displays the train arrival times by my house. It updates every seven seconds. The program runs great on my computer (macOS), but on pi (raspbian) the lines displaying the trains flash and then disappear in a weird pattern. For example, for the first two rotations, all the trains display perfectly. Then on the second rotation, the station name will flash and then disappear. Then on the third rotation, the title and the first five trains will disappear. Then on the fourth rotation the cycle will start again. The program is written in Python with tkinter. I know it’s not a monitor issue like the monitor itself blacking out because the monitor has no problems when the program isn’t running. I will post videos of the program running on my laptop and on the pi in the comments.
The logic of how the lines disappear:
line.after(7, line.destroy())
time.sleep(7)
Then the API is called again and new lines populate.
Please help, I have been stuck on this for months.

submitted by /u/Clean_Ad4062
[link] [comments]

More...
Post Reply

Return to “Raspberry Pi Forum”