import sys import os import traceback with open("win_debug.log", "w") as f: f.write("1 - Start\n") f.flush() try: with open("win_debug.log", "a") as f: f.write("2 - Imports...\n"); f.flush() import numpy as np with open("win_debug.log", "a") as f: f.write("3 - Importing Face Model...\n"); f.flush() sys.path.append("c:/Users/Vasanth kumar/OneDrive/Desktop/new_clg_project/backend") from models.face_model import predict_emotion with open("win_debug.log", "a") as f: f.write("4 - Generating Zero Frame...\n"); f.flush() frame = np.zeros((480, 640, 3), dtype=np.uint8) with open("win_debug.log", "a") as f: f.write("5 - Executing predict_emotion...\n"); f.flush() res = predict_emotion(frame, []) with open("win_debug.log", "a") as f: f.write(f"6 - Done: {res}\n"); f.flush() except Exception as e: with open("win_debug.log", "a") as f: f.write("ERROR!\n" + traceback.format_exc()); f.flush()