From ef5bab65e82007756fc7f9d21838b8678d362db4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 31 Aug 2024 15:46:41 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/reader.py b/src/calibre/ebooks/oeb/reader.py index 0fe46ca7e4..632cce3344 100644 --- a/src/calibre/ebooks/oeb/reader.py +++ b/src/calibre/ebooks/oeb/reader.py @@ -106,7 +106,7 @@ class OEBReader: elem.tag = OPF(barename(elem.tag)) nsmap.update(OPF2_NSMAP) attrib = dict(opf.attrib) - if xmlns := attrib.pop('xmlns:'): + if xmlns := attrib.pop('xmlns:', None): attrib['xmlns'] = xmlns nroot = etree.Element(OPF('package'), nsmap={None: OPF2_NS}, attrib=attrib)