diff --git a/src/calibre/ebooks/metadata/epub.py b/src/calibre/ebooks/metadata/epub.py index 39fd5390fa..1828a76639 100644 --- a/src/calibre/ebooks/metadata/epub.py +++ b/src/calibre/ebooks/metadata/epub.py @@ -92,11 +92,11 @@ class OCFReader(OCF): def __init__(self): try: - mimetype = self.open('mimetype').read().rstrip() + mimetype = self.open('mimetype').read().decode('utf-8').rstrip() if mimetype != OCF.MIMETYPE: print('WARNING: Invalid mimetype declaration', mimetype) except: - print('WARNING: Epub doesn\'t contain a mimetype declaration') + print('WARNING: Epub doesn\'t contain a valid mimetype declaration') try: with closing(self.open(OCF.CONTAINER_PATH)) as f: