Switch from PySimpleGUI to FreeSimpleGUI

- Replace PySimpleGUI 5.0.8.3 with FreeSimpleGUI 5.1.1
- FreeSimpleGUI is a community fork without license requirements
- PySimpleGUI 5.x requires paid license after trial period
- Remove compatibility fallback code (no longer needed)
- Update documentation to reflect FreeSimpleGUI usage

Fixes: AttributeError 'module PySimpleGUI has no attribute theme'
This commit is contained in:
Claude 2026-01-02 20:33:05 +00:00
parent 0aad0f80d2
commit b76db81575
No known key found for this signature in database
2 changed files with 5 additions and 13 deletions

12
gui.py
View file

@ -1,8 +1,8 @@
""" """
Dashboard GUI for Eugen Bot Dashboard GUI for Eugen Bot
Live monitoring interface using PySimpleGUI Live monitoring interface using FreeSimpleGUI
""" """
import PySimpleGUI as sg import FreeSimpleGUI as sg
import threading import threading
from datetime import datetime from datetime import datetime
from queue import Queue from queue import Queue
@ -19,11 +19,7 @@ class Dashboard:
bot: Reference to the main bot instance bot: Reference to the main bot instance
""" """
self.bot = bot self.bot = bot
# PySimpleGUI 5.x compatibility
try:
sg.theme('DarkBlue3') sg.theme('DarkBlue3')
except AttributeError:
sg.set_options(theme='DarkBlue3')
# Event queue for thread-safe updates # Event queue for thread-safe updates
self.event_queue = Queue() self.event_queue = Queue()
@ -200,11 +196,7 @@ class SetupWizard:
"""Configuration wizard for first-time setup""" """Configuration wizard for first-time setup"""
def __init__(self): def __init__(self):
# PySimpleGUI 5.x compatibility
try:
sg.theme('DarkBlue3') sg.theme('DarkBlue3')
except AttributeError:
sg.set_options(theme='DarkBlue3')
def run(self): def run(self):
""" """

View file

@ -1,5 +1,5 @@
irc==20.1.0 irc==20.1.0
python-dotenv==1.0.0 python-dotenv==1.0.0
PySimpleGUI==5.0.8.3 FreeSimpleGUI==5.1.1
requests==2.31.0 requests==2.31.0
httpx==0.25.0 httpx==0.25.0