View Single Post
Old 04-15-2021, 10:59 PM   #2217
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by ownedbycats View Post
Code:
calibre, version 5.14.0
ERROR: Unhandled exception: <b>ValueError</b>:Not a ZIP file

calibre 5.14* [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (7, 2, 1) && Action Chains (1, 7, 2) && Audit Log (1, 0, 16) && Barnes & Noble (1, 2, 16) && Calibre Power Search Plugin (2, 0, 0) && Comments Cleaner (1, 3, 2) && Count Pages (1, 11, 0) && Embed Comic Metadata (1, 6, 1) && EpubCheck (0, 2, 3) && EpubMerge (2, 11, 0) && Extract ISBN (1, 5, 0) && FanFicFare (4, 1, 0) && Fantastic Fiction (1, 4, 0) && Favourites Menu (1, 0, 5) && Find Duplicates (1, 8, 5) && Generate Cover (2, 0, 2) && GetFileName (0, 1, 1) && Goodreads (1, 5, 1) && Import List (1, 5, 4) && Job Spy (1, 0, 190) && Kindle hi-res covers (0, 5, 0) && Kobo Books (1, 8, 2) && Kobo Utilities (2, 13, 2) && KoboTouchExtended (3, 4, 4) && Library Codes (1, 0, 50) && Manage Series (1, 2, 11) && Modify ePub (1, 6, 2) && Obok DeDRM (7, 2, 1) && Open With (1, 5, 13) && Quality Check (1, 11, 2) && Reading List (1, 7, 6) && Search The Internet (1, 8, 1) && SmartEject (2, 3, 0) && Standard Ebooks (1, 0, 0) && Sum Column (0, 3, 1) && View Manager (1, 6, 0) && Walk Search History (1, 3, 2)
Traceback (most recent call last):
  File "D:\Documents\git\calibre\src\calibre\ebooks\oeb\polish\container.py", line 1183, in __init__
  File "D:\Documents\git\calibre\src\calibre\utils\zipfile.py", line 775, in __init__
  File "D:\Documents\git\calibre\src\calibre\utils\zipfile.py", line 810, in _GetContents
  File "D:\Documents\git\calibre\src\calibre\utils\zipfile.py", line 825, 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_plugins.koboutilities.action", line 5310, in update_book_toc_on_device
  File "calibre_plugins.koboutilities.action", line 5483, in _get_chapter_status
  File "calibre_plugins.koboutilities.action", line 5399, in _get_chapter_list
  File "calibre_plugins.koboutilities.action", line 5341, in load_ebook
  File "D:\Documents\git\calibre\src\calibre\ebooks\oeb\polish\container.py", line 1190, in __init__
  File "D:\Documents\git\calibre\src\calibre\utils\localunzip.py", line 253, in extractall
  File "D:\Documents\git\calibre\src\calibre\utils\localunzip.py", line 240, in _extractall
ValueError: Not a ZIP file
I got this error while updating the TOC for a handful of fics. Any idea what's going on?

The error didn't reoccur when I tried again and when I put the three books into epub-checker there were only some minor errors about html attributes.

EDIT: Actually, I suspect it might be because I tried to run it before the book had completely finished sending to device.
That would be it. The error is that the book file is not a valid zip file, and if it was in the midst of being copied, to the device, it could cause something like that. I have been thinking of adding a check to see if there were any device jobs in the queue before running this. Your error proves that it is needed And it should have been on a few of the other functions as well.

Are you having any other issues with this? Any suggestions for improvements?
davidfor is offline