From 0aad0f80d2f7ea852a7e79b6dba0f88676e6a65c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Jan 2026 20:29:52 +0000 Subject: [PATCH 1/3] Fix PySimpleGUI 5.x compatibility issue with theme() method - Add try/except fallback for sg.theme() -> sg.set_options() - Resolves AttributeError when using PySimpleGUI 5.0.8.3 - Maintains backward compatibility with PySimpleGUI 4.x --- gui.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gui.py b/gui.py index 498fa2a..3967192 100644 --- a/gui.py +++ b/gui.py @@ -19,7 +19,11 @@ class Dashboard: bot: Reference to the main bot instance """ self.bot = bot - sg.theme('DarkBlue3') + # PySimpleGUI 5.x compatibility + try: + sg.theme('DarkBlue3') + except AttributeError: + sg.set_options(theme='DarkBlue3') # Event queue for thread-safe updates self.event_queue = Queue() @@ -196,7 +200,11 @@ class SetupWizard: """Configuration wizard for first-time setup""" def __init__(self): - sg.theme('DarkBlue3') + # PySimpleGUI 5.x compatibility + try: + sg.theme('DarkBlue3') + except AttributeError: + sg.set_options(theme='DarkBlue3') def run(self): """ From b76db815757ed4dfcbc3d0990e667747348a5118 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Jan 2026 20:33:05 +0000 Subject: [PATCH 2/3] 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' --- gui.py | 16 ++++------------ requirements.txt | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/gui.py b/gui.py index 3967192..b94c600 100644 --- a/gui.py +++ b/gui.py @@ -1,8 +1,8 @@ """ 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 from datetime import datetime from queue import Queue @@ -19,11 +19,7 @@ class Dashboard: bot: Reference to the main bot instance """ self.bot = bot - # PySimpleGUI 5.x compatibility - try: - sg.theme('DarkBlue3') - except AttributeError: - sg.set_options(theme='DarkBlue3') + sg.theme('DarkBlue3') # Event queue for thread-safe updates self.event_queue = Queue() @@ -200,11 +196,7 @@ class SetupWizard: """Configuration wizard for first-time setup""" def __init__(self): - # PySimpleGUI 5.x compatibility - try: - sg.theme('DarkBlue3') - except AttributeError: - sg.set_options(theme='DarkBlue3') + sg.theme('DarkBlue3') def run(self): """ diff --git a/requirements.txt b/requirements.txt index 0f81a20..6f78d2a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ irc==20.1.0 python-dotenv==1.0.0 -PySimpleGUI==5.0.8.3 +FreeSimpleGUI==5.1.1 requests==2.31.0 httpx==0.25.0 From 156bcbb52ff1c261547f4bc1fa92ced0dd17196a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 2 Jan 2026 20:33:30 +0000 Subject: [PATCH 3/3] Update CLAUDE.md to reflect FreeSimpleGUI usage --- CLAUDE.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index aeb2bf5..d484d94 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,7 +20,7 @@ - **Language**: Python 3.9+ (recommended 3.11+) - **AI Provider**: Perplexity API (sonar-pro model) - **Chat Protocol**: Twitch IRC -- **GUI Framework**: PySimpleGUI +- **GUI Framework**: FreeSimpleGUI 5.1+ (community fork, no license required) - **Platform**: Windows-native (no Linux tools required) ## Project Structure @@ -68,12 +68,11 @@ eugen/ ### Dependencies ``` -perplexity-python-client==1.0.0 irc==20.1.0 python-dotenv==1.0.0 -PySimpleGUI==4.60.0 +FreeSimpleGUI==5.1.1 requests==2.31.0 -httpx # For async API calls +httpx==0.25.0 ``` ### Environment Variables (.env)