From 493a0b847aac6fae570ee98ae134fe0159943c9d Mon Sep 17 00:00:00 2001 From: xunbu Date: Tue, 23 Sep 2025 11:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dxlsx=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E6=9F=90=E4=BA=9B=E5=90=8E=E7=BC=80=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docutranslate/app.py | 4 ++-- docutranslate/workflow/xlsx_workflow.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docutranslate/app.py b/docutranslate/app.py index 599eec2..01461ea 100644 --- a/docutranslate/app.py +++ b/docutranslate/app.py @@ -160,7 +160,7 @@ async def lifespan(app: FastAPI): global_logger.propagate = False global_logger.setLevel(logging.INFO) print("应用启动完成,多任务状态已初始化。") - print(f"服务接口文档: http://12ent.0.0.1:{app.state.port_to_use}/docs") + print(f"服务接口文档: http://127.0.0.1:{app.state.port_to_use}/docs") print(f"请用浏览器访问 http://127.0.0.1:{app.state.port_to_use}\n") yield # 清理任何可能残留的临时目录 @@ -1506,7 +1506,7 @@ async def service_content( file_info = task_state.get("downloadable_files", {}).get(file_type) if not file_info or not os.path.exists(file_info.get("path")): raise HTTPException(status_code=404, - detail=f"任务 '{task_id}' 不支持获取 '{file_type}' 类型の内容,或文件已丢失。") + detail=f"任务 '{task_id}' 不支持获取 '{file_type}' 类型的内容,或文件已丢失。") file_path = file_info["path"] filename = file_info["filename"] diff --git a/docutranslate/workflow/xlsx_workflow.py b/docutranslate/workflow/xlsx_workflow.py index 3baa9d2..d0b01a3 100644 --- a/docutranslate/workflow/xlsx_workflow.py +++ b/docutranslate/workflow/xlsx_workflow.py @@ -44,7 +44,7 @@ class XlsxWorkflow(Workflow[XlsxWorkflowConfig, Document, Document], HTMLExporta def _get_document_xlsx(self, document: Document) -> Document: suffix = document.suffix - converter_types = self._converter_factory.get(suffix) + converter_types = self._converter_factory.get(suffix.lower()) if converter_types is None: raise ValueError(f"Xlsx工作流不支持{suffix}格式文件") converter_type, converter_config = converter_types