Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-02-2023, 07:23 PM   #1
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 80
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?
perisiana is offline   Reply With Quote
Old 06-02-2023, 07:27 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,803
Karma: 54830978
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).
theducks is offline   Reply With Quote
Advert
Old 06-02-2023, 07:36 PM   #3
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 80
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by theducks View Post
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).
On Windows 11.
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.
perisiana is offline   Reply With Quote
Old 06-03-2023, 05:52 AM   #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,858
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 06-03-2023, 09:58 AM   #5
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 80
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by kovidgoyal View Post
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.
I excluded the calibre folder from the antivirus scan, the folder is in the normal drive of the pc, isn't in any sync program (i use FreeFileSync to mirror it in another folder that is connected with my clouds, but the program works only when is open, and only when i give the command).

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
perisiana is offline   Reply With Quote
Advert
Old 06-04-2023, 04:26 AM   #6
Sunlite
Addict
Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.Sunlite ought to be getting tired of karma fortunes by now.
 
Sunlite's Avatar
 
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.
Sunlite is offline   Reply With Quote
Old 06-04-2023, 11:25 AM   #7
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,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Sunlite View Post
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.
Run Library Maintenance . It should flag that kind of issue
theducks is offline   Reply With Quote
Old 06-05-2023, 08:45 PM   #8
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 80
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by Sunlite View Post
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.
Nailed it, i just tried it with one of the old books and changing the name of the book calibre deleted all the files in the old folder and created a new folder with all the files under the author folder.
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.
perisiana is offline   Reply With Quote
Old 06-05-2023, 10:09 PM   #9
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 80
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by theducks View Post
Run Library Maintenance . It should flag that kind of issue
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
perisiana is offline   Reply With Quote
Old 06-05-2023, 10:20 PM   #10
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,803
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by perisiana View Post
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
Outta millions of users, you are an outlier.
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)
theducks is offline   Reply With Quote
Old 06-05-2023, 10:28 PM   #11
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,858
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 06-05-2023, 11:10 PM   #12
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 80
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by kovidgoyal View Post
It sounds like there were permission problems on the files. Hard to say since the OP didnt post the actual error message.
The error is:


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.
perisiana is offline   Reply With Quote
Old 06-06-2023, 01:08 AM   #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,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
See https://www.mobileread.com/forums/sh...d.php?t=354367
kovidgoyal is offline   Reply With Quote
Old 06-07-2023, 12:40 AM   #14
perisiana
Connoisseur
perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.perisiana shapes the world with his or her thoughts.
 
Posts: 80
Karma: 105086
Join Date: Sep 2016
Device: Kobo Aura H2O
Quote:
Originally Posted by kovidgoyal View Post

Thank you!
perisiana is offline   Reply With Quote
Old 06-11-2023, 06:16 PM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
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.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


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


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