From 76fe0d4550cb48eb87d0ee7bf4e8306f506356a6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 10 Jul 2025 17:39:29 +0800 Subject: [PATCH] fix --- python_core/ai_video/api_client.py | 2 -- python_core/ai_video/video_generator.py | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/python_core/ai_video/api_client.py b/python_core/ai_video/api_client.py index 5ac8afd..2aa7c31 100644 --- a/python_core/ai_video/api_client.py +++ b/python_core/ai_video/api_client.py @@ -236,7 +236,6 @@ class APIClient: elapsed = wait_count * interval remaining = max(0, timeout - elapsed) progress_msg = f"[运行中] 任务运行中,已等待{elapsed}秒,预计剩余{remaining}秒..." - logger.info(progress_msg) if progress_callback: progress_callback(progress_msg) @@ -265,7 +264,6 @@ class APIClient: elapsed = wait_count * interval remaining = max(0, timeout - elapsed) progress_msg = f"[排队中] 任务排队中,已等待{elapsed}秒,预计剩余{remaining}秒..." - logger.info(progress_msg) if progress_callback: progress_callback(progress_msg) time.sleep(interval) diff --git a/python_core/ai_video/video_generator.py b/python_core/ai_video/video_generator.py index b4067b2..079b89c 100644 --- a/python_core/ai_video/video_generator.py +++ b/python_core/ai_video/video_generator.py @@ -387,11 +387,7 @@ def main(): sys.stdout.flush() def progress_callback(message): - try: - print(message) - except UnicodeEncodeError: - # Fallback for Windows GBK encoding issues - print(message.encode('utf-8', errors='ignore').decode('utf-8', errors='ignore')) + ... if args.action == "single": if not args.image or not args.prompt or not args.output: