BUG: AttributeError: 'ScreenshotService' object has no attribute '_platform'
Root cause: In __init__, _get_default_save_path() was called BEFORE
_platform was initialized. The method tried to access self._platform
to determine the save path.
FIX: Moved platform detection BEFORE save path initialization in:
- core/screenshot.py
- core/screenshot_secure.py
- core/screenshot_vulnerable.py
Order changed from:
1. self._save_path = self._get_default_save_path() # FAILS - needs _platform
2. self._platform = platform.system().lower()
To:
1. self._platform = platform.system().lower()
2. self._save_path = self._get_default_save_path() # WORKS - _platform exists
This is a common Python initialization order bug where methods called
in __init__ reference attributes that haven't been set yet.
BUGS FIXED:
1. Missing dependencies in requirements.txt:
- Added pytesseract>=0.3.10 (OCR service needs it)
- Added psutil>=5.9.0 (Analytics plugin needs it)
- Added pywin32>=306 for Windows (window/screenshot needs it)
2. Type mismatch in plugin_api.py:
- get_eu_window() documented as returning Dict[str, Any]
- But actually returned WindowInfo dataclass
- Fixed: Now converts WindowInfo to dict before returning
This should resolve most import and type errors users were seeing.
All 10 core services implemented and integrated:
CORE SERVICES:
1. Nexus API Client - Search items, mobs, market data
2. Data Store - Plugin persistence with auto-backup
3. Notification System - Toast notifications with sounds
4. Window Manager - EU window detection and focus
5. HTTP Client - Cached HTTP with rate limiting
6. Event Bus - Typed events with pub/sub
7. Audio Service - Sound playback with volume control
8. Clipboard Manager - Copy/paste with history
9. Screenshot Service - Screen capture with auto-save
10. Task Manager - Thread pool with priorities
Each service:
- Singleton pattern
- Thread-safe
- PluginAPI integration
- BasePlugin convenience methods
Updated:
- core/main.py - Initialize all services
- core/plugin_api.py - Service registration
- plugins/base_plugin.py - Exposed methods