diff --git a/src/calibre/ebooks/docx/char_styles.py b/src/calibre/ebooks/docx/char_styles.py index 0c781004d5..655f3c1b42 100644 --- a/src/calibre/ebooks/docx/char_styles.py +++ b/src/calibre/ebooks/docx/char_styles.py @@ -15,7 +15,7 @@ from calibre.ebooks.docx.names import XPath, get def read_text_border(parent, dest): border_color = border_style = border_width = padding = inherit elems = XPath('./w:bdr')(parent) - if elems: + if elems and elems[0].attrib: border_color = simple_color('auto') border_style = 'solid' border_width = 1