Quantcast
Channel: MobileRead Forums - Reading and Management
Viewing all articles
Browse latest Browse all 23759

Problem with epub zip files sent via Wireless Device?

$
0
0
I'm seeing problems where some of the epubs sent to CC in my phone from Calibre have (slightly) damaged zip files when they arrive.

(For anyone who didn't know, an epub is a zip file with a bit of standardized structure.)

I say '(slightly)' because some book readers, including Calibre, can still read them.

I noticed the problem from Android app @Voice Aloud Reader reporting "This ebook file appears to be damaged" for some, but not all, of my recent uploads. When I reported it to them with the epub, they pointed out the damaged zip.

I'm using Calibre 4.18 on Windows 10 and Calibre Companion 5.4.4.10 (401) on Android 10(?) on a Samsung Galaxy S10e, connecting as a Wireless Device.

Attached is one of the damaged epubs as copied from the CC dir on the phone and exhibits the following errors. The same book taken from the Calibre dir directly, saved from Calibre, and sent to a Nook from Calibre has no issues.

Errors:
Spoiler:
When added to Calibre, debug reports this, but Calibre otherwise silently fixes it:
Code:

Added cc2 Live Forever to db in: 0.1
Added 1 books in 0.3 seconds
Worker Launch took: 0.0840001106262
WARNING: Header ('content.opf') and directory ('META-INF/container.xml') filenames do not match inside ZipFile
Using directory filename 'META-INF/container.xml'
Traceback (most recent call last):
  File "site-packages\calibre\customize\ui.py", line 428, in get_file_type_metadata
  File "site-packages\calibre\customize\builtins.py", line 195, in get_metadata
  File "site-packages\calibre\ebooks\metadata\epub.py", line 217, in get_metadata
  File "site-packages\calibre\ebooks\metadata\epub.py", line 165, in get_zip_reader
  File "site-packages\calibre\ebooks\metadata\epub.py", line 148, in __init__
  File "site-packages\calibre\ebooks\metadata\epub.py", line 99, in __init__
  File "site-packages\calibre\ebooks\metadata\epub.py", line 153, in open
  File "site-packages\calibre\utils\zipfile.py", line 999, in read
  File "site-packages\calibre\utils\zipfile.py", line 623, in read
  File "site-packages\calibre\utils\zipfile.py", line 685, in read1
  File "site-packages\calibre\utils\zipfile.py", line 640, in _update_crc
BadZipfile: Bad CRC-32 for file u'META-INF/container.xml'

unzip -t:
Code:

unzip -t "..\..\cc2 Live Forever - Petrificus Somewhatus.epub"
Archive:  ..\..\cc2 Live Forever - Petrificus Somewhatus.epub
    testing: mimetype                OK
META-INF/container.xml:  mismatching "local" filename (content.opf),
        continuing with "central" filename version
    testing: META-INF/container.xml  OK
file #3:  bad zipfile offset (local header sig):  263
file #4:  bad zipfile offset (local header sig):  3224
file #5:  bad zipfile offset (local header sig):  3586
file #6:  bad zipfile offset (local header sig):  3931
file #7:  bad zipfile offset (local header sig):  4574
file #8:  bad zipfile offset (local header sig):  16728
At least one error was detected in ..\..\cc2 Live Forever - Petrificus Somewhatus.epub.



Any help getting this fixed would be appreciated.


Viewing all articles
Browse latest Browse all 23759

Trending Articles