Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-04-2018, 11:47 AM   #1
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Disappearing temp files in Windows

Recently, while editing several different books on Windows 10, I've hit "save" and been greeted by an error message tell me that META-INF/container.xml in the temp directory (somewhere in AppData/Local) is not found, and the file is then basically toast. Sometimes it's just the container.xml that's vanished, which I can manually recover (but it involves unzipping what's left of the epub and adding it manually, which is an annoying and long-winded process) but sometimes all the images are gone as well. Presumably there's something that's cleaning the temp directory that wasn't there a few Windows updates ago, or anti-virus updates or something. (Anyone know what it could be?)

Is there a fix for this that anyone can suggest, e.g. specifying a different temp directory? And if I do something like that, will the temp files be deleted when I close the editor or would I have to clean them manually?
Phssthpok is offline   Reply With Quote
Old 02-04-2018, 04:58 PM   #2
AnotherCat
....
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
I cannot remember the exact error messages but I occasionally experience much the same. If I recall correctly a number of people, including myself, experienced this a few years back and then it went away; it has returned for me over the last month or two.

I have not troubled myself finding a fix due to the occasional nature of the issue and because I found a simple work around that works 100% for me. When I cannot do a normal save due to the issue, in Editor I do a File>Save As to hard drive, then delete the copy in Calibre, load the "Save As" copy into Calibre then open that in Editor. It works for me with no loss of any previous edits.
AnotherCat is offline   Reply With Quote
Advert
Old 02-04-2018, 05:08 PM   #3
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,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Try giving calibre a dedicated location for its temporary files via the CALIBRE_TEMP_DIR environment variable, see Calibre User Manual - Environment variables

Which version of Win 10. In 1709 there's a new feature, "Controlled Folder Access", that 'stops' programs using some folder operations - like opening them! Its a means of thwarting ransomware attacks. Might be worth checking out if its enabled. I think you have to opt-in to make use of it, and I have NOT heard of it deleting anything.

However there are 3rd party tools that attempt to do 'garbage collection' of the Temp directory, wouldn't surprise me if an AV vendor or something similar added such a feature - which you have to opt-out of Ψ²

BR
BetterRed is offline   Reply With Quote
Old 02-04-2018, 09:40 PM   #4
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,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just specify a different temp dir one that's hopefully not auto-cleaned and you will be fine. In the next release of calibre, I have added code to use the cache dir rather than the temp dir for temp files to avoid this issue with temp file cleaners.
kovidgoyal is offline   Reply With Quote
Old 02-04-2018, 09:55 PM   #5
AnotherCat
....
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
Quote:
Originally Posted by BetterRed View Post
...Which version of Win 10. In 1709 there's a new feature, "Controlled Folder Access", that 'stops' programs using some folder operations - like opening them! Its a means of thwarting ransomware attacks. Might be worth checking out if its enabled. I think you have to opt-in to make use of it, and I have NOT heard of it deleting anything...
One has to opt in to "Controlled Folder Access".
AnotherCat is offline   Reply With Quote
Advert
Old 02-05-2018, 03:50 AM   #6
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by AnotherCat View Post
I have not troubled myself finding a fix due to the occasional nature of the issue and because I found a simple work around that works 100% for me. When I cannot do a normal save due to the issue, in Editor I do a File>Save As to hard drive, then delete the copy in Calibre, load the "Save As" copy into Calibre then open that in Editor. It works for me with no loss of any previous edits.
I already tried that, and container.xml had already vanished. Seems like the original "save" attempt lost it somehow.
Phssthpok is offline   Reply With Quote
Old 02-05-2018, 03:52 AM   #7
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by BetterRed View Post
Try giving calibre a dedicated location for its temporary files via the CALIBRE_TEMP_DIR environment variable, see Calibre User Manual - Environment variables
BR
OK, thanks.
Phssthpok is offline   Reply With Quote
Old 02-05-2018, 03:53 AM   #8
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 558
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
Quote:
Originally Posted by kovidgoyal View Post
Just specify a different temp dir one that's hopefully not auto-cleaned and you will be fine. In the next release of calibre, I have added code to use the cache dir rather than the temp dir for temp files to avoid this issue with temp file cleaners.
I look forward to it eagerly!
Phssthpok is offline   Reply With Quote
Old 02-05-2018, 04:20 PM   #9
AnotherCat
....
AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.AnotherCat ought to be getting tired of karma fortunes by now.
 
Posts: 1,547
Karma: 18068960
Join Date: May 2012
Device: ....
Quote:
Originally Posted by Phssthpok View Post
I already tried that, and container.xml had already vanished. Seems like the original "save" attempt lost it somehow.
OK, maybe the issue I occasionally get is different, I'll pay more attention to the error message when it happens again - I never bother to pay it much attention as they have been few and far between and the quick work around has always sorted it for me from way back.

Regarding temp folders, the issue I (and I think everyone else) has is all the dross that collects in them that is never automatically cleaned out. I know Kovid's Calibre one will remain super-clean though .
AnotherCat is offline   Reply With Quote
Old 02-05-2018, 09:51 PM   #10
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,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah calibre always deletes its temp files on exit, unless it crashes. And with the change to use the cache dir for the editor/viewer I have even added code to have those programs delete any left over temp files from a crash on startup as well.
kovidgoyal is offline   Reply With Quote
Old 03-02-2018, 07:12 PM   #11
VirgoGirl
"Why is it doing *that*?"
VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.
 
VirgoGirl's Avatar
 
Posts: 322
Karma: 725344
Join Date: Sep 2011
Device: Black Kobo Touch & Glo, responsible for 2 PaperWhites
Hello! I have just experienced this for the first time twice in the past two days, editing an epub with Calibre's editor and having it say: "No such file or directory: 'META-INF/container.xml'
Python function terminated unexpectedly
C:\Users\JEANNE~1\AppData\Local\Temp\calibre_0ivav e\ozej2q.epub is not a valid EPUB file (could not find opf) (Error Code: 1)"
.. when I tried to reopen it. I was simply editing the text and adding some .css to the the stylesheet.

The second time I had a problem - today - I only realised there was a problem when I tried to run the spellcheck and it threw up an error. Luckily I had a backup copy on my reader which I was able to copy over and re-edit. The re-edit was fine, no issues even though I did the same things. Yesterday I was able to reconvert the file in Calibre, replacing what had disappeared (*that* may have been my fault as I was using some broad regex search and replace commands that may have caused that issue)


I'm running V3.0 on Win10, have since July and these two instances are the first problems I've had. I did notice that after I had this error message my Temp file in Appdata was pretty clean, which makes me think Windows may have dumped temp files?
VirgoGirl is offline   Reply With Quote
Old 03-02-2018, 09:44 PM   #12
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,532
Karma: 26944418
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by VirgoGirl View Post
[ . . . ] which makes me think Windows may have dumped temp files?
If that were true, this and every other support forum would light up like Sydney Harbour on NYE.

Most likely an over aggressive 3rd party utility - such as 'AV Scanning', 'Computer Tune-Up', or 'Garbage Collection'.

BR
BetterRed is offline   Reply With Quote
Old 03-02-2018, 10:47 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,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Recent releases of calibre no longer use the temp directory for storing these types of files, because this temp file deleting behavior is becoming more widespread. So if you update, you should be fine. Or you can just set the CALIBRE_TEMP_DIR environment variable as described here: https://manual.calibre-ebook.com/cus...ment-variables
kovidgoyal is offline   Reply With Quote
Old 03-03-2018, 09:14 AM   #14
VirgoGirl
"Why is it doing *that*?"
VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.VirgoGirl ought to be getting tired of karma fortunes by now.
 
VirgoGirl's Avatar
 
Posts: 322
Karma: 725344
Join Date: Sep 2011
Device: Black Kobo Touch & Glo, responsible for 2 PaperWhites
Quote:
Originally Posted by BetterRed View Post
If that were true, this and every other support forum would light up like Sydney Harbour on NYE.

Most likely an over aggressive 3rd party utility - such as 'AV Scanning', 'Computer Tune-Up', or 'Garbage Collection'.

BR
I don't have any of those on my computer, so it can't be that.

Thanks. Kovid, I'll update. The program and the editor are great. I've never had an issue before so I assumed I somehow corrupted it in the past 2 days.

Thanks again!
VirgoGirl is offline   Reply With Quote
Old 03-03-2018, 09:19 AM   #15
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
I'm using the latest version (3.18), and it's still using the TEMP directory for temp Calibre files: C:\Users\myusername\AppData\Local\Temp

VirgoGirl - You can manually delete all the files in your TEMP directory periodically, in case anything gets corrupted. It won't hurt anything at all.

Last edited by deback; 03-03-2018 at 09:27 AM.
deback is offline   Reply With Quote
Reply

Tags
temp folders

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows deleting Viewer's temp files? Steven Karp Calibre 5 10-28-2017 05:14 PM
Calibre temp files keep disappearing lawnparty Calibre 9 09-04-2015 04:47 AM
Temp files cleanup kiwidude Development 2 03-05-2011 10:56 AM
Temp files... BadGandalf Calibre 17 10-24-2010 11:38 AM
Temp files Jeff L Calibre 3 10-14-2010 05:58 PM


All times are GMT -4. The time now is 03:12 PM.


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