fix: pydantic
This commit is contained in:
parent
6bab8d8499
commit
a6052a731d
|
|
@ -8,12 +8,7 @@ Central configuration management for the MixVideo V2 application.
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
try:
|
from pydantic import BaseSettings, Field
|
||||||
from pydantic_settings import BaseSettings
|
|
||||||
from pydantic import Field
|
|
||||||
except ImportError:
|
|
||||||
# Fallback for older pydantic versions
|
|
||||||
from pydantic import BaseSettings, Field
|
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
|
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
|
||||||
Test script to verify path fixes for AI video generation
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import json
|
|
||||||
|
|
||||||
def test_environment():
|
|
||||||
"""Test the environment and paths"""
|
|
||||||
result = {
|
|
||||||
"status": "success",
|
|
||||||
"current_directory": os.getcwd(),
|
|
||||||
"python_executable": sys.executable,
|
|
||||||
"python_version": sys.version,
|
|
||||||
"script_path": __file__,
|
|
||||||
"python_core_exists": os.path.exists("python_core"),
|
|
||||||
"ai_video_module_exists": os.path.exists("python_core/ai_video"),
|
|
||||||
"video_generator_exists": os.path.exists("python_core/ai_video/video_generator.py")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Test module import
|
|
||||||
try:
|
|
||||||
sys.path.append('python_core')
|
|
||||||
from ai_video import VideoGenerator
|
|
||||||
result["module_import"] = "success"
|
|
||||||
result["module_import_error"] = None
|
|
||||||
except Exception as e:
|
|
||||||
result["module_import"] = "failed"
|
|
||||||
result["module_import_error"] = str(e)
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
result = test_environment()
|
|
||||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
||||||
Loading…
Reference in New Issue