Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 04-10-2026, 03:50 AM   #1
milkywaycicada
Junior Member
milkywaycicada began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2024
Device: none
Error with EPUBs: File is not a Zip file

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
milkywaycicada is offline   Reply With Quote
Old 04-10-2026, 04:16 AM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 51,188
Karma: 179232776
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Try opening the ePub with a zip utility and then re-saving it. I once found a couple of ePubs from an imprint of a publisher that were not properly ZIPped. I used 7Zip to open them, extract the contents and then rezipped them with a utility that knew enough not to compress the mimetype file.

The error oddly enough was that the first two bytes of the zip archive were pk not PK.

Last edited by DNSB; 04-10-2026 at 04:19 AM.
DNSB is offline   Reply With Quote
Old 04-10-2026, 05:37 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,185
Karma: 29626604
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look at the filename of your epub file

/Volumes/LaCie/Calibre/YarningChick/My Angel (818)/._My Angel - YarningChick.epub

Notice the ._ at the start. This is not the original epub file. You have something else creating these bogus files in your calibre library folder.
kovidgoyal is offline   Reply With Quote
Old 04-10-2026, 08:50 AM   #4
milkywaycicada
Junior Member
milkywaycicada began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2024
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Look at the filename of your epub file

/Volumes/LaCie/Calibre/YarningChick/My Angel (818)/._My Angel - YarningChick.epub

Notice the ._ at the start. This is not the original epub file. You have something else creating these bogus files in your calibre library folder.
Unsure how that would happen. I just ran a test. The ._ format comes up in "Unknown Files in Books" when I run "check my library" on metadata (shown as ._metadata) and the cover (as ._cover) of what looks to be all of the broken books. It looks like the accurate epub file (without ._) is coming up under "Extra Book Formats".
milkywaycicada is offline   Reply With Quote
Old 04-10-2026, 09:13 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,185
Karma: 29626604
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
just delete those files that start with ._ and you will be fine.
kovidgoyal is offline   Reply With Quote
Old 04-10-2026, 12:23 PM   #6
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,972
Karma: 106592599
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by kovidgoyal View Post
Look at the filename of your epub file

/Volumes/LaCie/Calibre/YarningChick/My Angel (818)/._My Angel - YarningChick.epub

Notice the ._ at the start. This is not the original epub file. You have something else creating these bogus files in your calibre library folder.
That looks like a temporary (and hidden) filename used by rsync during a file transfer.
j.p.s is offline   Reply With Quote
Old 04-10-2026, 12:25 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,185
Karma: 29626604
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
More likely an AppleDouble file https://en.wikipedia.org/wiki/AppleS...Double_formats
kovidgoyal is offline   Reply With Quote
Old 04-10-2026, 07:14 PM   #8
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,972
Karma: 106592599
Join Date: Apr 2011
Device: pb360
Never heard of ti before, but I agree it is more likely.
j.p.s is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Doplhin EasyReader format? Daisy? Zip-file with a prm and ini file inside it! general_public Workshop 0 01-26-2019 10:04 AM
ePub3 to Mobi Error - Error(prcgen):E21027: Epub file has more than one opf file dtsmith Kindle Formats 4 01-30-2018 11:20 AM
Cannot Read .htm file auto-imported as zip file Jimbo724 Conversion 2 07-24-2012 06:08 AM
Where is the .exe file in the zip Calibre2opds file? chilady1 Related Tools 4 09-17-2011 11:56 AM
Error message for dummy.zip file? itimpi Conversion 3 06-24-2011 01:49 PM


All times are GMT -4. The time now is 10:17 AM.


MobileRead.com is a privately owned, operated and funded community.