fix(server-release): 修复 MinerU 本地解析两处语法错误
1. 移除 cmd 数组中多余的 "--" 参数,导致 -p/--path 无法识别 2. finally 块中 "清理临时目录" 缺少 # 注释符,触发 NameError
This commit is contained in:
@@ -814,7 +814,6 @@ def parse_with_mineru(
|
||||
|
||||
cmd = [
|
||||
str(mineru_exe),
|
||||
"--",
|
||||
"-p", str(file_path),
|
||||
"-o", str(output_dir),
|
||||
"-m", "auto",
|
||||
@@ -859,7 +858,7 @@ def parse_with_mineru(
|
||||
logger.error(f"MinerU 解析失败: {e}")
|
||||
raise
|
||||
finally:
|
||||
清理临时目录
|
||||
# 清理临时目录
|
||||
if cleanup_output and os.path.exists(output_dir):
|
||||
shutil.rmtree(output_dir, ignore_errors=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user