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)