Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug?] [Solved] Menu not generating an event on latest Raspbian Pi4

Aperta
#6,860 13 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
desktop

Direzione di ricerca

Inizia con il riproduttore minimo usando sg.Menu e window.read su Pi4 Bookworm, quindi confronta il suo comportamento con quello segnalato sul desktop Ubuntu. Verifica se facendo clic su New User viene prodotto un evento; il lavoro è completato quando la causa specifica della piattaforma è stata identificata e documentata oppure l’evento di menu previsto è stato ripristinato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug?

Operating System

bookworm on Pi4
glibc 2.36
3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]

PySimpleGUI 5.0.8
tkinter 8.6.13
Python version 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]

Your Experience In Months or Years (optional)

Years Python programming experience
20

Years Programming experience overall
40

Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
yes


Troubleshooting

These items may solve your problem. Please check those you've done by changing - [ ] to - [X]

  • Searched main docs for your problem PySimpleGUI Documenation
  • Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demo Programs
  • None of your GUI code was generated by an AI algorithm like GPT
  • If not tkinter - looked for Demo Programs for specific port
  • For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • Run your program outside of your debugger (from a command line)
  • Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.com
  • Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
  • Tried running the Development Build. Your problem may have already been fixed but not released. Check Home Window for release notes and upgrading capability
  • For licensing questions please email license@PySimpleGUI.com
Detailed Description

JUST A WHOLE LOT OF NOTHING returned on menu click.
Sub-menu pops up and goes away just fine, but no event generated.
Works OK on my Ubuntu desktop - just not here on my Pi4.

import PySimpleGUI as sg

layoutPRINT = [
    [sg.Button('Print your TAB',  disabled=False, key='-tab_print-')],
    [sg.Button('and Finalize it', disabled=False, key='-tab_erase-')],
]

menu_def=[['New User',['Register']]]

layout=[
    [sg.Menu(menu_def)],
    [sg.Frame("", layoutPRINT)],
]

window = sg.Window('menu-play', [layout], finalize=True, keep_on_top=True)

while True:

    event, values = window.read(timeout=100)

    if event != sg.TIMEOUT_EVENT:
        print(event)

    if event == sg.WIN_CLOSED:
        break

window.close()
Lingua principale
Python
Stelle
13.8k
Fork
1.8k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PySimpleGUI/PySimpleGUI

Tutte le issue di PySimpleGUI/PySimpleGUI

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.