import sys import os # Add project root to path current_dir = os.path.dirname(os.path.abspath(__file__)) project_root = os.path.dirname(current_dir) sys.path.append(project_root) from web.services.feature_service import FeatureService print("Starting Rebuild...") try: count = FeatureService.rebuild_all_features(min_matches=1) print(f"Rebuild Complete. Processed {count} players.") except Exception as e: print(f"Error: {e}") import traceback traceback.print_exc()