🐛 dinglehopper: Do try to get text when no TextEquivs exist

pull/38/head
Gerber, Mike 4 years ago
parent f14ae46870
commit e4e2777cb7

@ -185,6 +185,10 @@ class ExtractedText:
def get_textequiv_unicode(s):
"""Get the TextEquiv/Unicode text of the given PAGE text element"""
textequivs = s.findall('./page:TextEquiv', namespaces=nsmap)
if not textequivs:
return None
def get_index(te):
index = te.attrib.get('index')
try:

Loading…
Cancel
Save