From 6ad8b5475438f427945e157d7a9b77c74132fb71 Mon Sep 17 00:00:00 2001 From: Jay Xu Date: Mon, 4 Aug 2025 16:07:03 +0800 Subject: [PATCH] =?UTF-8?q?fix=20"TypeError:=20'<'=20not=20supported=20bet?= =?UTF-8?q?ween=20instances=20of=20'Emu'=20and=20'Non=E2=80=A6=20(#9209)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …eType'" ### What problem does this PR solve? fix "TypeError: '<' not supported between instances of 'Emu' and 'NoneType'" ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- deepdoc/parser/ppt_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deepdoc/parser/ppt_parser.py b/deepdoc/parser/ppt_parser.py index 58a983266..39eab03a6 100644 --- a/deepdoc/parser/ppt_parser.py +++ b/deepdoc/parser/ppt_parser.py @@ -87,7 +87,7 @@ class RAGFlowPptParser: break texts = [] for shape in sorted( - slide.shapes, key=lambda x: ((x.top if x.top is not None else 0) // 10, x.left)): + slide.shapes, key=lambda x: ((x.top if x.top is not None else 0) // 10, x.left if x.left is not None else 0)): try: txt = self.__extract(shape) if txt: @@ -96,4 +96,4 @@ class RAGFlowPptParser: logging.exception(e) txts.append("\n".join(texts)) - return txts \ No newline at end of file + return txts