From 6931c4b039b54dc3c623d439c708b9a3d0ccfbcc Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Sat, 14 Feb 2026 23:40:09 +0000 Subject: [PATCH] fix: Fix HTTPClient, Dashboard, and Log Parser errors BUG FIXES: 1. HTTPClient '_generate_cache_key' AttributeError: - The method definition was missing, only had docstring and body - Added proper method signature: def _generate_cache_key(self, url, params) 2. Dashboard 'bg_dark' KeyError: - EU_COLORS doesn't have 'bg_dark' - Changed to 'bg_secondary' which is the correct color 3. Log Parser 'maximum recursion depth exceeded': - read_log() was calling itself instead of parent method - Changed to super().read_log() to call BasePlugin's method These fixes resolve: - Universal Search not working - API errors - Dashboard customize dialog crash - Log Parser infinite recursion --- core/http_client.py | 2 ++ plugins/dashboard/plugin.py | 2 +- plugins/log_parser_test/plugin.py | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/http_client.py b/core/http_client.py index 597f860..b778b50 100644 --- a/core/http_client.py +++ b/core/http_client.py @@ -186,6 +186,8 @@ class HTTPClient: pass return url + + def _generate_cache_key(self, url: str, params: Optional[Dict] = None) -> str: """Generate a cache key from URL and parameters.""" key_string = url if params: diff --git a/plugins/dashboard/plugin.py b/plugins/dashboard/plugin.py index b8f8a88..ece6750 100644 --- a/plugins/dashboard/plugin.py +++ b/plugins/dashboard/plugin.py @@ -266,7 +266,7 @@ class DashboardPlugin(BasePlugin): dialog.setWindowTitle("Customize Dashboard") dialog.setStyleSheet(f""" QDialog {{ - background-color: {EU_COLORS['bg_dark']}; + background-color: {EU_COLORS['bg_secondary']}; color: white; }} QLabel {{ diff --git a/plugins/log_parser_test/plugin.py b/plugins/log_parser_test/plugin.py index 623ab52..95f3a0e 100644 --- a/plugins/log_parser_test/plugin.py +++ b/plugins/log_parser_test/plugin.py @@ -360,7 +360,8 @@ class LogParserTestPlugin(BasePlugin): def read_log(self, lines=50): """Read recent log lines.""" try: - log_lines = self.read_log(lines=lines) + # Call parent class method (BasePlugin.read_log) + log_lines = super().read_log(lines=lines) if log_lines: self.raw_log_text.setPlainText('\n'.join(log_lines)) except Exception as e: