![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
|
Calibre deleting files after edit metadata
In the last couple of days i experienced a weird bug.
I'm checking my old books and i want to refresh the metadata with the new informations disponible online, but when i do so, the moment i click ok on the metadata window i get an error saying isn't possible to change the position on the disk for this book and if is open in another program (is not, also the folder isn't in any cloud folder). Then all the files of the book are deleted except for the folder and the cover. If i don't change the metadata i can open the books, sending them to my ereader etc as usual so i don't think they are corrupted? If i copy the book in the library and work on the new copy, everything is fine as usual. The files aren't really old cause i copied my library one year ago cause i changed my pc, but the books are in calibre since 2014 or more. With the newest files i don't get this error. Idk if this can be important but in the last week i download the kfx plugins and i'm converting all my books in kfx plus I'm adding word dumb x ray to them. Are all my old books somewhat corrupted or is a calibre bug? |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,892
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
What OS?
You can't rename if the file is open anyplace. Close any Viewer that is looking at that book (if on the PC). |
![]() |
![]() |
![]() |
#3 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
|
Quote:
I haven't my books open tho, nothing is using them. I just open the edit metadata window as usual, download metadata, but when i click i get that error and calibre delete all the files (multiple format of the book plus metadata . opf) leaving only the cover in the folder. It still shows in my library but if i try to delete it i get a message saying there's a permission error and calibre can't access to the files (probably because the files aren't there anymore) I have found the deleted books in the trash folder in calibre folder. |
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,173
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you get an error saying the file is open in another process, there will be some process that is opening it, preventing calibre from opening it. Exclude your calibre library folder from any antivirus/file sync programs. Makes ure it is one an NTFS drive and not anetwork attached storage or other non-native filesystem.
|
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
|
Quote:
I still get the error and calibre still deletes the files, so i just copied the old books in another library and copied them back in my main library, and now everything works as usual. I guess my old books metadata where somewhat corrupted and i didn't notice before cause i didn't try to change the metadata before. Still curious that instead of just getting the error message, Calibre decided to delete the books, like Calibre REALLY didn't like them lol |
|
![]() |
![]() |
![]() |
#6 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 206
Karma: 547516
Join Date: Mar 2008
Location: Berlin, Germany
Device: KObo Clara, Kobo Aura, PRS-T1, PB602, CyBook Gen3
|
Just a guess, but if the change included the author name or the title, your books might still be in the old folder. It sounds to me as calibre tried to move the files from the old folder to a new one, but was only able to move the meta data files.
Take a look into the library folder and see if the book files are stilll there. |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,892
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
|
Quote:
Then somehow calibre don't link the new folder to the book in the library but keep using the old folder that is empty, generating the error. |
|
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
|
Done it, it flags the issues and i corrected them.
Still it deletes or doesn't link the files, only for the older books. I'll just copy all the old books in another library and copy them back, this solve the problem. Still a strange bug i thought could be interesting for other users or the developers ![]() |
![]() |
![]() |
![]() |
#10 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,892
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I suspect some sort of Sync program is putting the old DB back after the change (or that file does not have full rights) Calibre must be on a local drive (and the Library folder not part of a 2 way sync) |
|
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,173
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It sounds like there were permission problems on the files. Hard to say since the OP didnt post the actual error message.
|
![]() |
![]() |
![]() |
#12 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
|
Quote:
calibre, version 6.19.1 ERRORE: Permesso negato: Non è possibile cambiare la posizione sul disco di questo libro. È aperto da qualche altro programma? Locked file: C:\Users\samsung\Calibre Library\LibreriaCompletaTotalePerenne\Conrad_ Joseph\La Linea D'Ombra (1366) Traceback (most recent call last): File "calibre\utils\copy_files.py", line 213, in copy_tree File "shutil.py", line 739, in rmtree File "shutil.py", line 621, in _rmtree_unsafe File "shutil.py", line 619, in _rmtree_unsafe PermissionError: [WinError 5] Accesso negato: "C:\\Users\\samsung\\Calibre Library\\LibreriaCompletaTotalePerenne\\Conrad_ Joseph\\La Linea D'Ombra (1366)" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre\gui2\metadata\single.py", line 617, in apply_changes File "calibre\gui2\metadata\basic_widgets.py", line 241, in commit File "calibre\db\legacy.py", line 934, in func File "calibre\db\cache.py", line 85, in call_func_with_lock File "calibre\db\cache.py", line 1508, in set_field File "calibre\db\cache.py", line 1522, in update_path File "calibre\db\backend.py", line 1875, in update_path File "calibre\utils\copy_files.py", line 217, in copy_tree File "shutil.py", line 739, in rmtree File "shutil.py", line 621, in _rmtree_unsafe File "shutil.py", line 619, in _rmtree_unsafe PermissionError: [WinError 5] Accesso negato: "C:\\Users\\samsung\\Calibre Library\\LibreriaCompletaTotalePerenne\\Conrad_ Joseph\\La Linea D'Ombra (1366)" "Accesso negato" means access denied. This book in particular got all the formats deleted except for the metadata and the cover. For other books where the author or the title are changed, calibre copy the files in a new folder but it doesnt link with the book in the library, that keeps being linked to the old empty folder. The library was sync with drive till 4 years ago when i read that was dangerous, then i never sync it again directly, also changed my pc since then (but maybe that's why only the old books get the error). Also thank you very much for your work, calibre is the best program around for libraries and is incredibly smart and well done in every aspect. |
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,173
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
![]() |
#14 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 88
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
|
Quote:
Thank you! |
|
![]() |
![]() |
![]() |
#15 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,038
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
calibre 6.20. Windows 11
Before "Windows: Make moving files in the calibre library folder more robust, locking folders in addition to files, before the start of the move", I've never had this problem. Can you please remove this? I'm getting a similar error when editing the metadata. I did not have it open in another program. The contents of the directory has been deleted. I've edited the eBook. Then I delete the original_epub. Then I go to change the metadata. I press the button to update the cover and the other to update the metadata. Then I get the error and boom, files are gone. I've done this twice with the same result. Code:
calibre, version 6.20.0 ERROR: Permission denied: Could not change the on disk location of this book. Is it open in another program? Locked file: I:\E\Calibre Library\Jon2\Michael Connelly\The Lincoln Lawyer (2744) Traceback (most recent call last): File "calibre\utils\copy_files.py", line 95, in _open_file PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'I:\\E\\Calibre Library\\Jon2\\Michael Connelly\\The Lincoln Lawyer (2744)' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "calibre\utils\copy_files.py", line 95, in _open_file PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'I:\\E\\Calibre Library\\Jon2\\Michael Connelly\\The Lincoln Lawyer (2744)' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "calibre\gui2\metadata\single.py", line 617, in apply_changes File "calibre\gui2\metadata\basic_widgets.py", line 241, in commit File "calibre\db\legacy.py", line 934, in func File "calibre\db\cache.py", line 85, in call_func_with_lock File "calibre\db\cache.py", line 1508, in set_field File "calibre\db\cache.py", line 1522, in update_path File "calibre\db\backend.py", line 1875, in update_path File "calibre\utils\copy_files.py", line 225, in copy_tree File "calibre\utils\copy_files.py", line 120, in __enter__ File "calibre\utils\copy_files.py", line 107, in _open_file File "calibre\utils\copy_files.py", line 111, in _open_file PermissionError: [Errno 13] File is open in another program: 'I:\\E\\Calibre Library\\Jon2\\Michael Connelly\\The Lincoln Lawyer (2744)' Last edited by JSWolf; 06-11-2023 at 06:28 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Resize the Cover or files box in 'Edit metadata layout' | MichaelSarri | Calibre | 15 | 11-13-2021 03:32 AM |
Problem with Calibre deleting files.... | gunnerasch | Calibre | 2 | 10-30-2017 01:33 AM |
Some book files get destroyed after I open them or edit metadata | wladdy | Library Management | 3 | 10-02-2014 08:44 PM |
Deleting temp calibre files sometimes takes forever | Takeshi_12 | Calibre | 6 | 07-29-2010 05:13 PM |
Calibre deleting files? | al35 | Calibre | 7 | 03-22-2010 12:43 PM |