1,261 questions
0
votes
1
answer
38
views
Is it possible to insert a checkbox in PysimpleGui table headings?
I have a PySimpleGui table and I want to select two columns to quickly generate a graph, Is it possible to insert a checkbox in PysimpleGui table headings? Or Is there any other way I can Select both ...
-1
votes
1
answer
37
views
Improving conditionais in a Python script [closed]
I'm writing a script in Python with PySimpleGUI, however I'm facing issues in how to implement conditionals when a button is clicked.
When the button "Generate Proxy" is clicked, it first ...
-2
votes
1
answer
63
views
How to change the button colors onclick event?
On a ms-window app., I wish to update the button style "on-click" event, and keep it back to its original style "on-release". I tested at least these 2 ways, both driving to no ...
0
votes
2
answers
39
views
How to reroute stdout and stderr to a Frame element (i.e. not to a Multiline element)
This Multiline rerouting below works, but this is not matching what I exactly want:
output_layout = [
[sg.Text("OUTPUT")],
[sg.Multiline(size=(0,5), font='Courier 8', ...
0
votes
1
answer
45
views
How to modify code for GUI-based realtime plotting using matplotlib?
I have a GUI using PySimpleGUI with multiple plots which receives data from a bluetooth device. I'd like to plot the received data in real-time ideally as fast as the points are received. Right now ...
0
votes
1
answer
44
views
PYSimpleGUI License window does not open in Ubuntu
When using the sample code on the terminal with 'python PYGtest.py':
import PySimpleGUI as sg
layout = [ [sg.Text('Hello, world!')] ]
window = sg.Window('Hello Example', layout)
while True:
event, ...
1
vote
1
answer
49
views
Not giving a total
So, I'm working on a GUI using pysimplegui the project is a compound interest calculator. So, when I hit the complete button, it should give me a total after so many years, but I just get 0.00.
# make ...
0
votes
0
answers
53
views
How do i access my pysimplegui program online?
I made a program using Pysimplegui, but I want to access it over the internet. I found pysimpleguiweb which looked promising, except it looks like it is still version 0.39, so it isn't finished? I ...
1
vote
1
answer
26
views
Is there a way to have the window automatically resize once an element is hidden in the layout?
I have two radio buttons. When the .csv button is selected, I want there to only be one input box. when .rsp is selected, I have a new input box appear. It creates space to fit between the radio ...
0
votes
2
answers
125
views
Why does python code only work sometimes?
I'm trying to open a tkinter window using PySimpleGUI towards the end of a lengthy program.
def raise_above_all(window):
window.attributes('-topmost', 1)
window.attributes('-topmost', 0)
...
0
votes
1
answer
56
views
Error handling and threading.Thread() issues
I am newer to Python, and I originally had error handling working as I liked. I wanted to add a progress bar using PySimpleGUI and after some research discovered that I needed to use threading. Once I ...
0
votes
1
answer
21
views
PySimpleGUI FolderBrowse and searching for file type
The program is intended to use PySimpleGUI to open a folder, and then I have a function to search through the folder and store all the variants of step files within that folder and return a list of ...
0
votes
1
answer
47
views
Python unable to find file in network directory
I'm trying to open an image from a folder in my network, but python can't find it.
It is a PySimpleGUI small app that shows images.
This is the code related:
img1 = os.path.join(values['-FOLDER-'], ...
0
votes
0
answers
36
views
I cant open a third window with PySimpleGUI
I found out that i have to do window3.read() in order to have it appear.
I can't create a third window. the code works without error but it doesn't display a window the code ends
Currently I'm trying ...
0
votes
0
answers
15
views
Setting PySimpleGUI.Text() element's height causes text update to botch
I have a PySimpleGUI.Text() element that I'd like to update with text as my program executes. I want it to be five lines high. It will be contained in another element, so I do not want to set its ...
0
votes
2
answers
192
views
Yes/No Popup on PySimpleGUI
How do I use yes/no popups on PySimpleGUI? I've searched everywhere, but the answers just aren't clear on this.
At the moment, I am just trying to make a simple yes/no program so I can get my head ...
0
votes
2
answers
58
views
What is the enable_events on buttons in pysimpleGUI
I wonder what does the parameter enable_events, do for a button (sg.Button).
Indeed, when there is a button in a code, it is always sending an event in the .read().
You don't need to specify ...
0
votes
4
answers
88
views
Displaying all Results for Prime Numbers on One Popup Window
I am trying to create a password generator in Python. I'm starting off by writing a program to generate prime numbers to use when calculating RSA, and I found a program that I modified to display ...
-1
votes
1
answer
54
views
Python PySimpleGUIQt Combo "display with empty lines" error? [closed]
I try to a list of object for which I implement the __str__ method as asked by the documentation : https://docs.pysimplegui.com/en/latest/documentation/module/elements/combo/
import PySimpleGUIQt as ...
0
votes
1
answer
39
views
PySimpleGUI popup buttons not working on display
I am writing Python code for a 10.1 inch touchscreen to display. I am using PiSimpleGUI for the interface. When I use popup windows, I am not able to click on the "ok" or "cancel" ...
0
votes
1
answer
44
views
socket.send stops working after first send in pysimplegui loop
I am trying to build a simple gui including a qr-code reader to send data to a remote server in python on Ubuntu for a school-project. I have set up a simple server to receive messages from the ...
0
votes
2
answers
61
views
how to stop a thread? Is it possible to tie a thread to a global variable? the thread2 in this script is not visible to elife statment event
import PySimpleGUI as sg
from my_scripts import *
from my_constants import *
import sys
import glob
import yt_dlp
import threading
import time
global thread2
sg.LOOK_AND_FEEL_TABLE['MyCreatedTheme'] ...
0
votes
1
answer
31
views
how to resolve InputText key error in this simple PySimpleGUI script
I do not see why i am getting this error: Traceback (most recent call last):
File ....\play_download.py", line 55, in
url = values['-url-']
~~~~~~^^^^^^^^^
KeyError: '-url-'
This error appears ...
0
votes
0
answers
26
views
pySimpleGui Popup Keep on top = True does not work on linux
I am creating an application that is running both on Windows and Linux.
I have a main Window and some settings popups, due to very specific targeted user it is absolutely mandatory for the popups not ...
0
votes
1
answer
30
views
Table bugging out when combined with expand_x=True
I wrote this code to try to create a column of buttons and a table next to them. However when I set expand_x=True for the table, the columns of the table glitch out as shown in this short video: https:...
0
votes
0
answers
28
views
PysimpleGUI creates plots under previous plots
In the below code my attempted work flow is:
1.) to browse for the selected geotiff and shapefile.
2.) click the 'Plot Me' button which will plot the two files together.
3.) click the 'Export Me' ...
0
votes
1
answer
35
views
PySimpleGUI App Layouts Not Resizing Properly When Changing Layouts on the Same Window"?
My app has different layouts that update visibily to hide and unhide the layouts. Hiding these layouts and showing a different one is done through event calls(button clicks). The problem is that when ...
0
votes
0
answers
151
views
QReader - detect_and_decode opens a copy of the .exe
i have a python project where i use QReader to detect and decode a qr code from images i sent to the app. The problem is, the first time the project runs "qreader.detect_and_decode" it opens ...
0
votes
1
answer
27
views
How to layout two buttons in verticle by PySimpleGUI?
I use code as below to set layout, I want to two buttons in vertical not in horizontal, what can I do?
layout = [
[
sg.Input(readonly=True, expand_x=True, key='Main', ...
0
votes
0
answers
22
views
How To Re-Enter Data For A Specific Field - AND 'CR to act like TAB
ubuntu 22.04 python 3.12 pysimplegui 5
First Question:
All Fields are mandatory on my 3 Field screen. Using a mouse click, it is possible to bypass the AGE Field. Then SUBMIT is pressed.
I would ...
0
votes
3
answers
59
views
PySimpleGUI personalized icon disappear if run the .exe on another PC (pyinstaller)
I didn't find anything like my problem already posted.
I did an application using PySimpleGUI and to realize the .exe i used pyinstaller and used the --icon command using both the image .ico address ...
0
votes
0
answers
288
views
Display 'Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.' after I run the PySimpleGUI example
I installed PySimpleGUI according to the official documentation (using the 'python3 -m pip install pysimplegui') command. And I tried to run the official example:
Example
It shows:
dingkwanmok@...
1
vote
1
answer
48
views
update size of Scrollable bar in pysimpleGUI
Basically I have the same issue than this one : issue
I tried this before but I get an error message, I think because I am using frames (I think).
As you can see I tried using window....
0
votes
0
answers
71
views
Pysimplegui to excel
from pathlib import Path
import PySimpleGUI as sg
import pandas as pd
from shutil import copyfile
import os
from openpyxl import load_workbook
fromgetting drawing.image import Image
# Adicinar colar ...
0
votes
0
answers
23
views
PySimpleGUI and matplotlib demo program not working on my Pi4
This question relates to a previous query about a program that used to run on a Pi3 but not an upgraded Pi4.
The demo program:
https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/...
0
votes
0
answers
104
views
Old python program no longer works after updating from Pi3 to Pi4 - reworked question
Attached is my code with edits reflecting what I've tried so far to get it to run. The app is supposed to show a window with real-time readings of two temperature sensors and a Hall-effect flow sensor....
0
votes
1
answer
70
views
Unable to Pin function in PysimpleGUI
I have a program adding and removing elements on the screen with + and - buttons, the problem is the fact that these buttons don't change position automatically after this change of display like I ...
0
votes
1
answer
34
views
PySimpleGUI tree doesn't Insert data into tree
I have been working on this tree in PysimpleGUI, suddenly the insert method decides to stop working when I give it a list full of data. I debugged nearly everything about it, the function insert ...
0
votes
3
answers
136
views
How to display only filename selected in pysimplegui when using a text label in front
It's my first try at a pysimplegui application.
Before I was using tkinter a lot but interface doesn't look that pretty and modern looking.
What I want to do is to have a window with 3 button, 2 to ...
0
votes
0
answers
41
views
Drawing a rectangle with buttons on top in PysimpleGUI
Is there a way to make a background using the graph function and drawrectangle. I want to have all of my buttons overlay the graph and have the rectangles just act as a background to make the gui look ...
0
votes
0
answers
21
views
Window in PysimpleGui Resizes after Matplot lib is used
I am trying to make a state machine using a gui imported from Pysimplegui. I have a home screen that has a button labeled "view available stock". I then transition to the code below, but ...
0
votes
1
answer
35
views
PySimpleGUI disabled an InputText according to sg.Radio?
I'm new to PySimpleGUI,
I want to implement this functionality: There are two radio buttons. When I select one of them, the text input box below becomes editable. When I select the other one, the text ...
0
votes
1
answer
84
views
Dynamic layout on pysimpleGUI with frames
(Explanation of my problem at the end)
Here is an example of a dynamic layout that add a Frame when I click on a button. Launch state of the program :
Then after button pressed :
Here is the code :
...
1
vote
2
answers
100
views
PySimpleGUI window crashes after opening Chrome, but only if Chrome isn't already open
I'm pretty new to Python and have been working with PySimpleGUI. I have created a simple program in Windows 11 that opens Google when you press a button on the GUI. It works fine if Chrome is already ...
0
votes
0
answers
215
views
Not able to import PySimpleGUI in mac m1
atal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.
Python runtime state: initialized
Current thread 0x00000001d7a61c40 (most recent call first):
File "<frozen ...
0
votes
1
answer
43
views
PySimpleGUI: How to detect overflow of elements beyond the window limits?
In the example below, there is a row with more elements than fit the window. How can I detect the overflow?
import PySimpleGUI as sg
layout = [[sg.Text(f"word{i}") for i in range(30)]]
...
-1
votes
1
answer
61
views
How to update input element to display new set of values on an event? PySimpleGui
I have an app that converts units(example Cm to Inch, etc). One function I want the app to have is to be able to change the units its converting, right now it only converts certain length elements but ...
0
votes
0
answers
44
views
Using pysimplegui & pandas to display cell values in pysimplegui window for next row that is missing a value in a particular column(s) in excel file
I have an issue, I'm after creating a data entry gui to take users input and populate an excel file using pysimplegui, pandas & openpyxl.
I want to display these column values to aid in data entry....
0
votes
1
answer
72
views
Window Not Opening PySimpleGUI Python
I have been trying to make a ChatGPT extension that creates a window which takes in your voice as input and prints the response on the window and also says it using text-to-speech. When I run it, it ...
0
votes
1
answer
37
views
How to stop window.read() from firing again?
task_adding = [
[
pg.Text("Enter name of the task: ", size=(10, 1)),
pg.InputText(key='-NAME-', do_not_clear=False)
],
[
pg.Text("Enter prio: ")...