[Bug] unknown color is back (sorry)

Aberta
#6,902 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Pouca atividade
Stack de tecnologia
python
Domínio
desktop

Direção de pesquisa

Comece executando o código fornecido com PySimpleGUI 6.3 no Windows 11, concentrando-se na seleção de sg.theme("DefaultNoMoreNagging") e no valor de cor informado, 1234567890. Compare o comportamento com a Version 4 e, em seguida, localize o ponto de entrada da validação de tema ou de cor. Está concluído quando a cor desconhecida não reaparecer inesperadamente, com uma reprodução focada ou um teste confirmando o comportamento.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Bug Done - Install Dev Build (see docs for how) Port - TK
Type of Issue (Enhancement, Error, Bug, Question)

unknow color named 1234567890 is back with Version 6.3


Operating System

Windows 11

PySimpleGUI Port (tkinter, Qt, Wx, Web)

New install PSG this morning


Versions

NOTE - PSG4 is no longer supported

Please try Version 6 if you're running Version 4.

Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()

Python version (sg.sys.version)
PySimpleGUI Version (sg.__version__)

6.3

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)

Your Experience In Months or Years (optional)

Years Python programming experience 23

Years Programming experience overall 32

Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
Reverting to Version 4 Worked

Anything else you think would be helpful?


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
  • Upgraded to the latest release of PySimpleGUI on PyPI (Version 6)

Looks to be an issue from 2021 that was resolved, that has come back in Version 6

Detailed Description
Code To Duplicate

A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)

This pre-formatted code block is all set for you to paste in your bit of code:


# Paste your code here

import os
import PySimpleGUI as sg


DEFAULT_PATH = r"~\Python_Projects\_ProjectData"
TARGET_PATH = os.path.expanduser("~")

# Trying Different Themes to see which one worked
sg.theme("DefaultNoMoreNagging")
# sg.theme("LightGray1")
# sg.theme("SystemDefault")

# Define the layout of the window
layout = [
    [sg.Text("Select a folder below:")],
    [
        sg.InputText(key="-FOLDER-", size=(40, 1)),
        sg.FolderBrowse("Browse", initial_folder=TARGET_PATH),
        sg.Button("Default")
    ],
    [sg.Button("Run"), sg.Button("Exit")],
]

# Create the window
window = sg.Window("Folder Selector", layout)

# Event loop to process user actions
while True:
    try:
        event, values = window.read()

        # Handle window closure or Exit button
        if event == sg.WIN_CLOSED or event == "Exit":
            break

        if event == "Default":
          window["-FOLDER-"].update(DEFAULT_PATH)
          selected_folder=DEFAULT_PATH

        # Handle Run button
        if event == "Run":
            selected_folder = values["-FOLDER-"]

        if selected_folder:
            sg.popup("Success", f"Running process on:\n{selected_folder}")
        else:
            sg.popup_error("Error", "Please select a folder first!")

    except Exception as e:
        print(f"An error occurred: {e}")
window.close()


Screenshot, Sketch, or Drawing

Watcha Makin?

A way to generate local reports using stored html templates

Linguagem predominante
Python
Estrelas
13.8k
Forks
1.8k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de PySimpleGUI/PySimpleGUI

Todas as issues de PySimpleGUI/PySimpleGUI

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.