Questions tagged [tkinter]
Tkinter is the Python binding for the Tk graphical user interface (GUI) widget library.
74 questions
0
votes
0
answers
66
views
Well written soft doesnt work after update
I wrote code for my RPi as below and it was working preatty long time, unfortunatelly after system update buttons Start and Stop does not generate any reaction. What may be the reason and how to fix ...
0
votes
1
answer
87
views
Can't use tkinter, and may have multiple versions of python at once?
Unfortunately, I wasn't able to make this post with all the information I wanted to give. I was originally going to post it from the RPi 400 that I was having all these problems on, but apparently ...
-1
votes
1
answer
404
views
OpenCV issue - cv2image = cv2.cvtColor(frame, cv2.COLOR_BGR2RGBA)
I am curently trying to run the code below, which feeds a live stream to a tkinter gui:
from tkinter import *
from PIL import ImageTk, Image
import cv2
root = Tk()
# Create a frame
app = Frame(root, ...
1
vote
0
answers
2k
views
VideoPlayer using python, tkinter and pythong-vlc
I have created a video (with audio) player using vlc on Raspberry pi 4 board. Code and other details below. I have an HDMI screen attached on HDMI-1.
I am hiding the desktop using this approach.
This ...
1
vote
1
answer
242
views
My Application (based on python tkinter) is not running at Boot time (autostart) in Raspberry Pi Os?
I have made executable file of python tkinter application. It runs well when clicked. But I want to run it at Boot time (AutoStart) in Raspberry Pi Os.
I have tried many methods but they didn't work.
...
1
vote
0
answers
96
views
Tkinter GUI not starting on boot with ROS
I'm trying to launch a tkinter GUI I made that is used to read GPIO pins as well as some ROS topics. I'm using Buster 10 and ROS Melodic with Python 3.7. I am using Clearpath's robot_upstart package ...
0
votes
0
answers
271
views
Using Tkinter GUI to control the GPIO pins on Raspberry Pi when GUI isn't stored in Pi
Using Tkinter to control the GPIO pins on Raspberry Pi is easy and trivial, but can it be done when GUI is not stored in pi, but to another device. granted the device and Pi are connected to the same ...
1
vote
1
answer
352
views
Raspberry Pi 2 B Tkinter performance problem [closed]
I am trying to write a simple python program for a Rasperry Pi 2 Model B. When finished it should be able to get a few values via uart and display one out of 200 images based on that.
Additionally, it ...
0
votes
0
answers
61
views
Tkinter's 'create_text' inconsistent between raspberry pis
This one has me completely stumped, hoping someone can point me in the right direction!
Here's my MRE of the issue:
from tkinter import *
root = Tk()
w = 200
h = 200
c = Canvas(root, width=w, ...
0
votes
1
answer
133
views
Raspberry Pi official Display
I bought the official Raspberry Pi Display and wonder now how I can display a GUI on it. I‘m using Raspbian with desktop. I did a lot of research and tried to make an Autostart Programm, which shows a ...
0
votes
1
answer
350
views
Controlling a rotary encoder through a Tkinter interface (letting RPI control the dial instead of the dial controlling a function on the RPI)
EDIT*** I have a "STEC11B03 ALPS" rotary encoder and I want a python script to output the same signal to the circuit as the rotary encoder does when turning. I want the script to do the same ...
0
votes
0
answers
579
views
How to run python tkinter at start
I want to start my GUI app wrote in python with tkinter at start my Rpi, I set the start method in the rc.local like this:
sudo bash -c 'python /home/pi/Desktop/appPython/good.py > /home/pi/...
0
votes
1
answer
1k
views
Raspberry pi cannot run an executable file created in Python
I' m new to Raspberry Pi and I created a file with the code:
from tkinter import *
from PIL import Image, ImageTk
import board
import busio
from adafruit_as726x import AS726x_I2C
import time
import ...
0
votes
1
answer
76
views
Python tkinder reset button code fails on third attempt
I am trying to trigger a timer when there is audio and stop the timer when the audio is lower than a set value. There is a reset button that will reset the timer back to zero. The reset button works ...
1
vote
0
answers
228
views
Tkinter Script Autostart
I have a problem with loading the Tkinter script at every reboot of the Raspberry. The script is executable and starts from a .desktop file. No problem with it when the Raspbian OS is booted (I guess ...
0
votes
2
answers
588
views
Problem opening tkinter script via html page
I am working on this project where I have Raspberry Pi 3 with full Raspbian (with GUI) connected to a 7" screen. I created a Python 3 script:
// gui.py
import tkinter as tk
root = tk.Tk()
root....
0
votes
1
answer
1k
views
How to implement serial event detection for request /response operation with Tkinter
I am working an application where I read two sensor values in every 200ms and show values in Tkinter window .
My issue is in my application I have to response request from master PC through serial ...
2
votes
3
answers
4k
views
Help launching Tkinter on boot Pi 3
I tried the example in a Raspberry Pi SE question, creating a systemd ".service" in the past and it worked flawlessly, but now I'm running Tkinter with python3 on a raspberry pi3.
[Unit] ...
-2
votes
2
answers
1k
views
Autostart a program at boot up?
I want to autostart a Python script that starts a Tkinter GUI at boot up.
The working terminal command to start the script is python3 /home/pi/Documents/slincam/slincam_menu.py.
I added this command ...
5
votes
3
answers
3k
views
Start python script on pi through putty so it still runs after closing putty
I want to build a water dispanser using a raspberry pi.
The pi is attached to a touch screen.
Further, I made a python script to control everything.
From time to time, I want to adjust the script to ...
1
vote
0
answers
302
views
GUI with tkinter, 2 buttons touched together
Have written a GUI (touchscreen) for my Pi in Python 3 with tkinter. It works in fullscreen. I do not want to have an extra button for shutting down the Pi but when I push 2 buttons together. How can ...
-1
votes
2
answers
936
views
TKinter install settings : "module 're' has no attribute 'compile'" on import
If I run a "intro to TKinter" program in Thonny, it runs. From the command line or in Mu it gives this:
( Pi3 b, Buster, fresh apt update - install... )
..$ python3 code/tkinter_x.py
Traceback (...
1
vote
1
answer
139
views
Python Tkinder Button
i have a promblem with GUI Tkinter, when i click the button of my gui enviroment the arm of my robot dont response more specific call the function but steal remaning in 0 degre``es from the other my ...
0
votes
1
answer
163
views
why raspberry pi 3 fail to read 1000 p/r rotary encoder while my 8 bit nuvoton micro controller did that properly?
I am using LS s40-6-1000ZT(H) 1000 p/r rotary encoder for my project with raspberry pi 3,but raspberry not working properly as per encoder specification(i.e not counting event properly).What could be ...
0
votes
0
answers
83
views
Multi process loop not working as expected
I am working on project where i interfaced two MCP4725 dac with my Pi for sending set point to my two PID device i.e (rpm pid and torque pid) at same time .So i used multi threading concept but i am ...
0
votes
0
answers
2k
views
Tkinter no display error
I'm using Tkinter and running into the next error:
Traceback (most recent call last):
File "TKtest.py", line 3, in <module>
master = tk.Tk()
File "/usr/lib/python3.7/tkinter/__init__.py", ...
0
votes
0
answers
3k
views
Error when creating Python GUI using Tkinter: “no display name and no $DISPLAY environment variable”
last few days I've been working to create a GUI using Tkinter
This morning my code still worked, but now it crashed with said error:
Traceback (most recent call last):
File "TKtest.py", line 3, in &...
1
vote
2
answers
3k
views
Tkinter not running on updated python
So, I'm trying to use a project, that uses tkinter on my Raspberry Pi but I have an issue.
I needed an updated version of Python, so I updated it to 3.7.4, however, when I try to import tkinter, it ...
1
vote
1
answer
3k
views
Run python script on Raspbian desktop through ssh access
I have a RaspberryPi with a PiTFT 3.5 display connected. The display is configured to mirror the HDMI output and the Pi is running Raspbian desktop.
Now what I am trying to do is to run a python ...
-1
votes
1
answer
3k
views
Need a large (20 inch +) touch screen monitor Raspberry Pi 3b+/4b running Debian Buster
I'm looking for a large (20 inch +) touch screen monitor for Raspberry Pi 3b+/4b running Debian Buster. We tried the ViewSonic TD2230 but the driver support is lacking; Tkinter misses about 35% of the ...
1
vote
1
answer
439
views
a python GUI application to display some measured value (with Raspberry Pi)
I am developing a GUI (with python tkinter) application for a measurement system with Raspberry pi. I made the GUI and the code to do the measurement. But my question is how to link them together. ...
0
votes
2
answers
11k
views
RASPBERRY PI Error Python GUI : “no display name and no $DISPLAY environment variable”
Hi guys I want to create a basic GUI with TKinter.
This is my code
from tkinter import*
import tkinter.font
win =Tk()
win.title("Test")
myFont = tkinter.font.Font( family = 'Helvetica', size = 12, ...
5
votes
4
answers
13k
views
Launch a GUI Tkinter program on boot
I am trying to auto launch a Tkinter/Python program when the Raspberry Pi boots up.
Ideally I would like to boot the Pi into the console and then launch a GUI Tkinter Python program. In testing – not ...
0
votes
1
answer
2k
views
grab_set issue with tkinter toplevel window
I'm having an issue with the grab_set command when opening a toplevel window on my Pi. I'm using a grab_set to disable the screen below the toplevel and releasing it on close of the window.
I doesn't ...
1
vote
0
answers
173
views
GUI Button Highlight [closed]
I'm having an issue with the highlight of the buttons on a GUI that I created with tkinter.
When I run the GUI on my windows machine and the cursor is over the button, the button is not highlighted ...
0
votes
0
answers
402
views
I want to toggle a button from GUI tkinter and display a counts from GPIO
I want to toggle a button from GUI tkinter and display a counts from GPIO.
Here I have a counter system code:
from gpiozero import *
from time import sleep
#####GPIO input##########
led = LED(26)
...
1
vote
1
answer
43
views
Opening a new form
I have an application that I am using a keypad with. I'm using the pad4pi library. On the main form I have a button that opens a second form. The second form is its own class name nform. I have ...
1
vote
1
answer
3k
views
No module named '_tkinter' on python3 in Raspbian
I have installed tkinter on my Raspberry Pi that is running Raspbian.
It is installed for both python2 and python3. However while importing it in python3, it shows me an error:
>>> import ...
-1
votes
1
answer
292
views
How to display a tkinter window while using a push hardware button to capture images?
I have a project in which involves capturing of images. I have to display a UI while capturing an image if a button is pressed. This is the code.
def create_window(self):
t = tk.Toplevel(self)
...
0
votes
0
answers
343
views
How to toggle a push button to capture an image and insert a string in a text widget?
I have a project that involves capturing an image using a push button and after I use image processing I can convert it into a string. How do I make the string display the tkinter text widget while ...
0
votes
1
answer
895
views
3.5" touchscreen, tkinter output only?
I am currently working on a project for which I am using a 3.5" touchscreen as an output for some buttons. I can get it to be used as the output for the whole GUI, but that leads to the display being ...
2
votes
1
answer
440
views
Attribute and Type Error using Button class in Tkinter/GPIO Zero combination
I'm new to programming and I'm trying to write a simple program to change the blink rate of an LED using a GUI.
When I try to run this on my RaspberryPi 2B running Raspbian, I get the following ...
0
votes
1
answer
1k
views
Tkinter Push Button with Virtual Buttons
So I'm working on a project which requires both limit switch inputs and relay control outputs. I'm using an optocoupled relay so the output from the Pi's GPIO is more than adequate to run them. It's ...
0
votes
2
answers
1k
views
Automatic shortcut execution on boot
I want to achieve following:
run my GUI (made in Tkinter interface) application automatically as I boot the RPi (i.e. no desktop screen loading). But I want to be able kill the application so I can ...
0
votes
1
answer
604
views
Preventing user from exiting Tkinter GUI program on Raspbian
I am creating a kiosk-mode program for Raspberry Pi, using Raspbian +Python/Tkinter. I need to have keyboard attached, so the user is able to enter a password, but I need to prevent the user from ...
0
votes
1
answer
881
views
Thread not working on Tkinter
I have created this program, but the function does not get called. I'm learning how to use threads. Any suggestion is well appreciated.
#!/usr/bin/env python3
import tkinter as tk
from threading ...
1
vote
1
answer
7k
views
How to make a non-blocking delay on Tkinter?
The following code is a stopwatch on Tkinter which has GPIO involved. I tried adding time.sleep for debouncing the button, but it also delays the stopwatch execution. Makes sense. But I just started ...
0
votes
1
answer
412
views
Tkinterhtml fails to run on raspbian. Python 3.7
Tkinterhtml fails to run on Raspbian. Python 3.7
_tkinter.TclError: couldn't load file "/usr/local/lib/python3.7/site-packages/tkinterhtml/tkhtml/Linux/32-bit/Tkhtml/libTkhtml3.0.so":
/usr/local/lib/...
1
vote
0
answers
241
views
Having trouble on one of the raspi official projects "getting started with GUIs"
I have raspi 3, and working on "Getting started with GUIs".
I am currently on this page (https://projects.raspberrypi.org/en/projects/getting-started-with-guis/11) and having trouble at the line ...
-1
votes
1
answer
849
views
Start Python script with image display (Start Python Skript mit Bilderanzeige)
I want to build a photo box with a Raspberry Pi 3B + (Raspbian). The Python code works, but the autostart does not work: I've already tried to write the file in crontab, rc.local, bash.rc, a desktop ...