fix generate error (#1590)

### What problem does this PR solve?

#1550 #1210 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-07-18 14:33:30 +08:00
committed by GitHub
parent 4da3ee400b
commit 2b5812d0a9
4 changed files with 10 additions and 6 deletions

View File

@ -52,7 +52,7 @@ class RAGFlowPptParser(object):
break
texts = []
for shape in sorted(
slide.shapes, key=lambda x: (x.top // 10, x.left)):
slide.shapes, key=lambda x: ((x.top if x.top is not None else 0) // 10, x.left)):
txt = self.__extract(shape)
if txt:
texts.append(txt)