fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解 - 修复缺失的urllib.parse导入
This commit is contained in:
@@ -19,18 +19,21 @@ print("\n1. 测试模块导入...")
|
||||
|
||||
try:
|
||||
from multimodal_processor import get_multimodal_processor
|
||||
|
||||
print(" ✓ multimodal_processor 导入成功")
|
||||
except ImportError as e:
|
||||
print(f" ✗ multimodal_processor 导入失败: {e}")
|
||||
|
||||
try:
|
||||
from image_processor import get_image_processor
|
||||
|
||||
print(" ✓ image_processor 导入成功")
|
||||
except ImportError as e:
|
||||
print(f" ✗ image_processor 导入失败: {e}")
|
||||
|
||||
try:
|
||||
from multimodal_entity_linker import get_multimodal_entity_linker
|
||||
|
||||
print(" ✓ multimodal_entity_linker 导入成功")
|
||||
except ImportError as e:
|
||||
print(f" ✗ multimodal_entity_linker 导入失败: {e}")
|
||||
@@ -110,7 +113,7 @@ try:
|
||||
for dir_name, dir_path in [
|
||||
("视频", processor.video_dir),
|
||||
("帧", processor.frames_dir),
|
||||
("音频", processor.audio_dir)
|
||||
("音频", processor.audio_dir),
|
||||
]:
|
||||
if os.path.exists(dir_path):
|
||||
print(f" ✓ {dir_name}目录存在: {dir_path}")
|
||||
@@ -125,11 +128,12 @@ print("\n6. 测试数据库多模态方法...")
|
||||
|
||||
try:
|
||||
from db_manager import get_db_manager
|
||||
|
||||
db = get_db_manager()
|
||||
|
||||
# 检查多模态表是否存在
|
||||
conn = db.get_conn()
|
||||
tables = ['videos', 'video_frames', 'images', 'multimodal_mentions', 'multimodal_entity_links']
|
||||
tables = ["videos", "video_frames", "images", "multimodal_mentions", "multimodal_entity_links"]
|
||||
|
||||
for table in tables:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user