From 840e199c243bd0f0f50124efd89a7869d71fad1c Mon Sep 17 00:00:00 2001 From: ferkans-amir Date: Mon, 27 Jul 2026 22:01:46 +0200 Subject: [PATCH] fix(docx): guard None returned by findtext in OMML do_r method --- .../markitdown/src/markitdown/converter_utils/docx/math/omml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/markitdown/src/markitdown/converter_utils/docx/math/omml.py b/packages/markitdown/src/markitdown/converter_utils/docx/math/omml.py index dfa734cdc..c67bc4890 100644 --- a/packages/markitdown/src/markitdown/converter_utils/docx/math/omml.py +++ b/packages/markitdown/src/markitdown/converter_utils/docx/math/omml.py @@ -373,7 +373,7 @@ def do_r(self, elm): @todo \text (latex pure text support) """ _str = [] - for s in elm.findtext("./{0}t".format(OMML_NS)): + for s in (elm.findtext("./{0}t".format(OMML_NS)) or ""): # s = s if isinstance(s,unicode) else unicode(s,'utf-8') _str.append(self._t_dict.get(s, s)) return escape_latex(BLANK.join(_str))