Half of the EPUBs (547/1060) in my Calibre Library are coming up with the error: File is not a Zip File. So far though, I haven't found a corrupted one. All of them are able to be opened and read in other EPUB viewers. I have tried renaming them to Zip, which worked but the fix went away when I had to restore my database.
Spoiler:
calibre, version 9.7.0
ERROR: Loading book failed: Failed to open the book at /Volumes/LaCie/Calibre/YarningChick/My Angel (818)/._My Angel - YarningChick.epub. Click "Show details" for more info.
Failed to convert book: /Volumes/LaCie/Calibre/YarningChick/My Angel (818)/._My Angel - YarningChick.epub with error:
Traceback (most recent call last):
File "calibre/ebooks/metadata/epub.py", line 180, in get_zip_reader
File "calibre/utils/zipfile.py", line 813, in __init__
File "calibre/utils/zipfile.py", line 848, in _GetContents
File "calibre/utils/zipfile.py", line 863, in _RealGetContents
calibre.utils.zipfile.BadZipfile: File is not a zip file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "calibre/customize/ui.py", line 530, in get_file_type_metadata
File "calibre/customize/builtins.py", line 181, in get_metadata
File "calibre/ebooks/metadata/epub.py", line 285, in get_quick_metadata
File "calibre/ebooks/metadata/epub.py", line 264, in get_metadata
File "calibre/ebooks/metadata/epub.py", line 183, in get_zip_reader
File "calibre/utils/localunzip.py", line 264, in __init__
File "calibre/utils/localunzip.py", line 240, in _extractall
ValueError: Not a ZIP file
InputFormatPlugin: EPUB Input running
on /Volumes/LaCie/Calibre/YarningChick/My Angel (818)/._My Angel - YarningChick.epub
EPUB appears to be invalid ZIP file, trying a more forgiving ZIP parser
Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main()
Traceback (most recent call last):
File "calibre/ebooks/conversion/plugins/epub_input.py", line 270, in convert
File "calibre/utils/zipfile.py", line 813, in __init__
File "calibre/utils/zipfile.py", line 848, in _GetContents
File "calibre/utils/zipfile.py", line 863, in _RealGetContents
calibre.utils.zipfile.BadZipfile: File is not a zip file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "runpy.py", line 198, in _run_module_as_main
File "runpy.py", line 88, in _run_code
File "site.py", line 42, in <module>
File "site.py", line 38, in main
File "calibre/utils/ipc/worker.py", line 194, in main
File "<string>", line 1, in <module>
File "calibre/srv/render_book.py", line 828, in viewer_main
File "calibre/srv/render_book.py", line 819, in render_for_viewer
File "calibre/srv/render_book.py", line 796, in render
File "calibre/ebooks/oeb/iterator/book.py", line 64, in extract_book
File "calibre/customize/conversion.py", line 241, in __call__
File "calibre/ebooks/conversion/plugins/epub_input.py", line 277, in convert
File "calibre/utils/localunzip.py", line 253, in extractall
File "calibre/utils/localunzip.py", line 240, in _extractall
ValueError: Not a ZIP file