fix: replace emoji characters with ASCII-safe markers for Windows compatibility

- Replace Unicode emoji (✓, ⚠️) with [OK] and [WARN] in audio_preprocessor.py
  to prevent UnicodeEncodeError on Windows console (cp1252 codec)
- Add auto-update dependencies function to bot.py for easier maintenance
- Remove setup_linux.sh (no longer needed)
- Update .gitignore to exclude VS Code launch.json
This commit is contained in:
2026-01-31 13:54:27 -06:00
parent 9e537b7d20
commit d0de47bdd7
4 changed files with 30 additions and 220 deletions

22
bot.py
View File

@@ -1,6 +1,8 @@
import numba_config
import asyncio
import io
import subprocess
import sys
import time
from typing import Any
@@ -365,7 +367,27 @@ class TTSBot(commands.Bot):
return None
def auto_update_dependencies() -> None:
"""Auto-update pip packages on startup."""
try:
print("Checking for package updates...")
result = subprocess.run(
[sys.executable, "-m", "pip", "install", "-r", "requirements.txt", "-U", "-q"],
capture_output=True,
text=True,
check=False
)
if result.returncode == 0:
print("Packages updated successfully (or already up to date)")
else:
print(f"Warning: Package update had issues: {result.stderr}")
except Exception as e:
print(f"Warning: Could not auto-update packages: {e}")
def main():
auto_update_dependencies()
errors = Config.validate()
if errors:
print("Configuration errors:")