Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-15-2015, 11:17 AM   #1
Toreth
Junior Member
Toreth began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2013
Device: Nook ST
Unable to open file

I've been editing a book and saving regularly when Windows decided to run an update. Of course the computer restarted and when I tried to open my book in Sigil, I got an error cannot load epub: C:\Users... When I showed the details I got the message cannot unzip epub: c:\users...

When I tried to open the book in Calibre's ebook viewer I get error: could not open ebook. not a zip file and the details showed:

calibre, version 2.20.0
ERROR: Could not open ebook: Not a ZIP file

Traceback (most recent call last):
File "site-packages\calibre\gui2\viewer\main.py", line 38, in run
File "threading.py", line 763, in run
File "site-packages\calibre\ebooks\oeb\iterator\book.py", line 99, in __enter__
File "site-packages\calibre\customize\conversion.py", line 241, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\epub_in put.py", line 197, in convert
File "site-packages\calibre\utils\localunzip.py", line 223, in extractall
File "site-packages\calibre\utils\localunzip.py", line 210, in _extractall
ValueError: Not a ZIP file


The Nook app gave me the message: sorry unable to import.

I've even tried to restore my system but I still get the same messages. Is there any way to recover the file?

Thanks
Toreth is offline   Reply With Quote
Old 03-15-2015, 12:42 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Moderator Notice
Was posted in Sigil. Moved
theducks is online now   Reply With Quote
Advert
Old 03-15-2015, 01:06 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
This is an excellent example of why Windows Update was a bad move on Microsoft's part. But I guess you knew that already.

The PC must have restarted with excellent timing, while you were saving.

There are a variety of services out there that claim to (try to) repair corrupt zipfiles. Try renaming (a copy of) the epub to .zip and using some of them, it might work.

Hopefully you had a backup of the ebook.

Last edited by eschwartz; 03-16-2015 at 12:20 AM. Reason: typo
eschwartz is offline   Reply With Quote
Old 03-15-2015, 01:44 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Toreth - try using right click Restore Previous Versions on the file in question - maybe you'll get lucky.

And reconfigure Windows Update as shown, then you will be in control of when WU downloads, when WU installs, and when WU restarts.

Click image for larger version

Name:	Capture.JPG
Views:	248
Size:	54.2 KB
ID:	136025

The default setting assumes that entirety of the planet's population lives in the USA, that they can all afford to leave their computers running 24*7, and that they're all in bed at 03:00 in the morning

IMO auto-installs of anything are a menace - but most vendors, including MS, do NOT force you to accept being force fed. Although some of the majors in the Valley try mighty hard to do so.

BR

Moderator Notice
I also moved to Devices because its an OS issue - in truth its probably a Sigil issue, if the OP had been using the calibre editor then maybe the file would have been recoverable from a checkpoint - dunno if that's true as I never tried it

Last edited by BetterRed; 03-15-2015 at 02:38 PM.
BetterRed is offline   Reply With Quote
Old 03-15-2015, 02:55 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Hmm, interesting point -- checkpoints are saved within an editing session. Although not restored next time you edit, the info should still be accessible in the working directory, which is located in %TEMP% -- on Windows, this isn't (usually) cleared on reboot.

So if someone was using calibre's editor, the book could probably be restored, with work (mostly searching for the right folder), from the unpacked checkpoints directories.

Sigil doesn't use checkpoints, although it might have the same unpacked Tempfiles storage, I don't know -- I haven't used it in a while, and I never checked. Either way, the corruption might have affected those files as well -- but not calibre's checkpoints, which wouldn't be written to.
eschwartz is offline   Reply With Quote
Advert
Old 03-15-2015, 05:33 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
My appdata\local\temp is trashed on restart, but calibre has a private TEMP via CALIBRE_TEMP_DIR. Wherever possible I give all applications private TEMP areas. Avoids rummaging around in a pile of 'who knows what' when you're looking for something.

Does the editor take checkpoints of its own accord or only when user tells it to? There primary usage seems to be more like 'super undo' rather the checkpoint/restart facilities in TP monitors like CICS, Toledo, Sabre etc. That's where I first came across 'checkpoint' - a long, long time ago.

Ideally a substantial 'editor' (ie one in which you're likely to spend a long time) should do protection saves at a user specified interval, and be able to recover from it in the event of a crash, power out, equipment failure or other abrupt termination.

BTW - AFAIK WU does a bog-standard restart. If so then Sigil (or the calibre editor) would have got a message from Windows telling it to quit, at which point it could have done a 'protection save', and made a note of that in its control data. And then offered to reload that file next time it was used.

BR
BetterRed is offline   Reply With Quote
Old 03-15-2015, 06:03 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Word processors and the like usually do Restores, neither Sigil nor calibre do. Perhaps implementing such features is non-trivial to the point only teams dare touch it -- calibre and Sigil both have tiny dev teams, Sigil particularly has tended to survive off of one-off contributions.

Calibre checkpoints require manual intervention.
eschwartz is offline   Reply With Quote
Old 03-15-2015, 06:54 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
Word processors and the like usually do Restores, neither Sigil nor calibre do. Perhaps implementing such features is non-trivial to the point only teams dare touch it -- calibre and Sigil both have tiny dev teams, Sigil particularly has tended to survive off of one-off contributions.

Calibre checkpoints require manual intervention.
Notepad++ does it. It's a Scite editor, so it may even be part of Scite furniture. I don't think Don Ho or Neil Hodgson ever had serried ranks of slave coders in their garages.

None of the schemes are perfect, not even Wordperfect's - but they do work most of the time. They've got me out of a few black holes in the event of power fails, video card crashes or my own stupidity.

BR
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	236
Size:	69.1 KB
ID:	136036  
BetterRed is offline   Reply With Quote
Old 03-15-2015, 07:06 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Hah -- never used Notepad++ all that much. Nice app, but no linux build.

But a text editor has far less to track than a document editor. Anyway -- it is still the kind of thing that someone needs to focus on, which is less likely when only one or two people work on said program, have many things to focus on, and no one ever complained loudly enough.

I am therefore not terribly surprised by any software that doesn't have this (excepting business-class and its competition, or software manned by said ranks ). Would be a nice feature, of course.

Last edited by eschwartz; 03-15-2015 at 07:18 PM.
eschwartz is offline   Reply With Quote
Old 03-15-2015, 07:20 PM   #10
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quote:
Originally Posted by BetterRed View Post
My appdata\local\temp is trashed on restart
...
BR
I never set mine to do that, I prefer to do it manually every so often. But maybe Toreth doesn't clean out his temp directory on reboots and the files will still be there (on Windows 7 typically under Users\YourUsername\AppData\Local\Temp\Sigil\). It's worth a look.
Ripplinger is offline   Reply With Quote
Old 03-15-2015, 07:43 PM   #11
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Ripplinger View Post
I never set mine to do that, I prefer to do it manually every so often. But maybe Toreth doesn't clean out his temp directory on reboots and the files will still be there (on Windows 7 typically under Users\YourUsername\AppData\Local\Temp\Sigil\). It's worth a look.
- definitely worth a look

Under normal circumstances it appears to have a copy of the book under edit as it was when opened, that gets deleted when Sigil closes. Question is, when Sigil gets a close message because Windows wants to do a restart does it leave it there. Maybe it does because if I kill Sigil the session folder is still there
BetterRed is offline   Reply With Quote
Old 03-15-2015, 08:44 PM   #12
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
And same with calibre -- it doesn't always get a chance to clean up properly. I noticed that a number of times with Windows, the temp folder would slowly fill with calibre data folders even when closing normally.
On linux it seems to be promptly deleted.

Maybe something to do with file locking.
eschwartz is offline   Reply With Quote
Old 03-15-2015, 11:23 PM   #13
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: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
A power outage or crash or forced reboot *cannot* corrupt a file being edited in the calibre editor. The calibre editor makes *atomic* updates to the file. That mean that it saves a copy of the edited file and then atomically renames it to the original, only if the save operation successfully completed. I have no idea about Sigil.

@BR: Having autosaves at an interval is a poor man's alternative to using atomic file operations for updating files. It is typically found in older editing software or editing software where the file format being edited is suitable for in-place updates.
kovidgoyal is offline   Reply With Quote
Old 03-15-2015, 11:54 PM   #14
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Kovid -- how does atomic updating help one recover one's work if no save was attempted?
eschwartz is offline   Reply With Quote
Old 03-16-2015, 12:04 AM   #15
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: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I was only addressing autosaves as a mechanism for protection against corruption caused by crashes, which is what appears to have happened to the OP.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil unable to open a file Andjety Sigil 39 03-20-2017 11:08 PM
unable to open database file mihal.v Calibre 3 08-16-2014 09:44 AM
Unable to open database file wladdy Library Management 6 08-28-2012 05:04 AM
Unable to open database file JulieR Calibre 2 04-24-2009 04:40 AM
Unable to open file that is 8MB timyap Sony Reader 12 05-09-2008 09:51 AM


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


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