![]() |
#1 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2024
Device: many
|
Error after import of a lot of books
Hi Mobile Readers.
I recently learned how to create and manage a Calibre Library on an external drive, so I did it and imported the full folder of books I have. It took more than a day, and then once it finished I got the following errors : Code:
calibre, version 6.13.0 AVERTISSEMENT : Erreurs pendant l'ajout: Il y a eu des problèmes lors de l'ajout de certains fichiers, cliquez "Afficher les détails" pour plus d'information ---------------------------------------------------------------------- Échec de la lecture des métadonnées depuis le fichier : /media/lienrag/Elements/Livres/Source/Stephen King/La ballade de la balle elastique & L'h omme qui refusait de serrer la main (8837)/La ballade de la balle elastique & L'homme - Stephen King.epub Avec l'erreur : Traceback (most recent call last): File "/usr/lib/calibre/calibre/utils/ipc/pool.py", line 371, in worker_main result = func(*job.args, **job.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/ebooks/metadata/worker.py", line 81, in read_metadata mi, opf, has_cover = serialize_metadata_for(paths, tdir, group_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/ebooks/metadata/worker.py", line 27, in serialize_metadata_for f.write(cdata) OSError: [Errno 28] Aucun espace disponible sur le périphérique Code:
---------------------------------------------------------------------- Échec à ajouter le livremetadata /media/lienrag/Elements/Livres/Bibliothèque calibre/John Schember/Guide de demarrage rapide (1)/metadata.opf Avec l'erreur : Traceback (most recent call last): File "/usr/lib/calibre/calibre/gui2/add.py", line 458, in add_book book_id = self.dbref().create_book_entry(mi, cover=cdata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/db/legacy.py", line 341, in create_book_entry ret = self.new_api.create_book_entry(mi, cover=cover, add_duplicates=add_duplicates, force_id=force_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/db/cache.py", line 77, in call_func_with_lock return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/calibre/calibre/db/cache.py", line 1965, in create_book_entry self.backend.execute('INSERT INTO books(title, series_index, author_sort) VALUES (?, ?, ?)', File "/usr/lib/calibre/calibre/db/backend.py", line 1022, in execute return self.conn.cursor().execute(sql, bindings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/cursor.c", line 235, in resetcursor apsw.CantOpenError: CantOpenError: unable to open database file What caused that ? And how can I solve it ? There clearly was sufficient space on the external drive (more than 100 Gigabytes). Is there necessary to have some also on my /home ? And/or / ? How much ? |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,360
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
According to the first code block, you've run out of disk space. I don't know if that's the drive that holds the library or the drive that hold the temp files. But you need to free up some space someplace.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,195
Karma: 23000010
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to have space in /tmp. Some brain dead linux systems put /tmp in RAM. Either fix that or use the calibre env var to change its tmp directory to somewhere you actually have space.
https://manual.calibre-ebook.com/cus...ment-variables |
![]() |
![]() |
![]() |
#4 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2024
Device: many
|
Thanks.
Any idea on how much space I need ? And, is the current situation fixable or do I need to delete the library and re-import it ? |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,195
Karma: 23000010
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can use the bulk metadata edit dialog to set metadata from ebook files in all books. But again if you are going to be operating on huge numbers of books dont put /tmp in RAM, preferably use the same disk as your library is on to host /tmp for best performance and robustness.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2024
Device: many
|
Quote:
But how ? Manually, for 4000 books of which I don't know the metadata, that's not realistic. Or is there a way to have Calibre automatically recognize the metadata from the files that are on the disk, considering that I don't know which of the 36 k books are the 4 000 ones without metadata ? |
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2024
Device: many
|
Also, how much space do I need ?
I have 12 Gb of RAM (though I'm not sure that all of it was free when I launched the import - maybe 6 GiB was) and I don't have that free space on may current / nor my /home. Is it really a good idea to put the Calibre tmp directory on the external drive ? The external drive has no free space problem, that at least would be solved. |
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2024
Device: many
|
(weird, apparently my first reply is waiting for moderation, but the second passed fine...)
(not a real problem since they addressed different questions, it just makes the "also" of the second reply seems a bit weird, ah too bad) |
![]() |
![]() |
![]() |
#9 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,360
Karma: 133807966
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,180
Karma: 57532200
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Do them in small batches. Groups of <20 allows an easy recover when things go south. If you don't, and have a fail, you lose the whole fetch job.
And WHY do they ALL need to get external metadata? Most books have the basics, and Calibre should have used that when it added (unless you set Add to use the Filename instead) Be more selective. ![]() Now for the downside of BATCH get metadata: Some of it is WRONG ![]() ![]() FWIW it took me almost a year to pound the metadata (Library data) into shape for 900+ paper books I track with Calibre |
![]() |
![]() |
![]() |
#11 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,180
Karma: 57532200
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Recently, this has also happened to old users that had not posted recent (for whatever the definition of Recent was) |
|
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,195
Karma: 23000010
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Do them all, and yes put /tmp on the same disk as your library. How much space you need will depend on how many books their sizes, etc.
Or redo the import this time with /tmp on the same drive as your library. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
That's a lot of books! | wodin | Lounge | 0 | 03-29-2017 07:19 PM |
Export/Import all Calibre data - import error | IanKBrown | Calibre | 5 | 02-15-2017 08:32 PM |
Import on Filename changes mid import due to book error | Vortex | Calibre | 3 | 12-05-2014 11:49 AM |
Best way to automatically add a lot of books | foxbooks | Library Management | 3 | 05-31-2012 10:41 AM |
Import failed Error:404 when attempting to import from Calibre to Stanza | dvond | Apple Devices | 0 | 05-13-2011 03:00 PM |