x
This commit is contained in:
@@ -125,6 +125,13 @@ class GeometryVerificationService:
|
||||
|
||||
stdout, stderr = await process.communicate()
|
||||
|
||||
stdout_text = stdout.decode('utf-8') if stdout else ''
|
||||
stderr_text = stderr.decode('utf-8') if stderr else ''
|
||||
|
||||
logger.debug(f"验证脚本 stdout: {stdout_text[:500]}")
|
||||
if stderr_text:
|
||||
logger.debug(f"验证脚本 stderr: {stderr_text[:500]}")
|
||||
|
||||
if process.returncode == 0:
|
||||
# 尝试读取生成的报告文件(在 STP 文件目录下)
|
||||
report_path = stp_dir / (stp_abs_path.stem + "_verification_report.json")
|
||||
@@ -137,12 +144,12 @@ class GeometryVerificationService:
|
||||
else:
|
||||
# 解析 stdout 获取结果
|
||||
logger.warning(f"验证报告文件不存在: {report_path}")
|
||||
return self._parse_verification_output(stdout.decode('utf-8'))
|
||||
return self._parse_verification_output(stdout_text)
|
||||
else:
|
||||
logger.error(f"验证脚本执行失败 (returncode={process.returncode}): {stderr.decode('utf-8')}")
|
||||
logger.error(f"验证脚本执行失败 (returncode={process.returncode}): {stderr_text}")
|
||||
return {
|
||||
"status": "error",
|
||||
"error": stderr.decode('utf-8'),
|
||||
"error": stderr_text,
|
||||
"timestamp": datetime.now().isoformat()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user