Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2017, 01:41 PM   #1
spynumber
Member
spynumber began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2011
Device: Kindle
Error adding books

When ever I try to add books I get errors. Any ideas what I need to do to fix it? I have copied the log file below:

calibre, version 2.79.1
ERROR: Errors while adding: Failed to add any books, click "Show details" for more information


----------------------------------------------------------------------
Failed to add the book: Forgive My Grief Vol I - IV
D:\Books\Forgive My Grief\Forgive_My_Grief_01.mobi
With error:
Traceback (most recent call last):
File "site-packages\calibre\gui2\add.py", line 379, in add_book
File "site-packages\calibre\db\legacy.py", line 217, in create_book_entry
File "site-packages\calibre\db\cache.py", line 61, in call_func_with_lock
File "site-packages\calibre\db\cache.py", line 1530, in create_book_entry
File "site-packages\calibre\db\backend.py", line 822, in execute
File "c:\cygwin64\home\kovid\sw\build\apsw-3.8.2-r1\src\cursor.c", line 231, in resetcursor
CantOpenError: CantOpenError: unable to open database file


----------------------------------------------------------------------
Failed to add the book: Forgive My Grief Vol I - IV
D:\Books\Forgive My Grief\Forgive_My_Grief_04.mobi
With error:
Traceback (most recent call last):
File "site-packages\calibre\gui2\add.py", line 379, in add_book
File "site-packages\calibre\db\legacy.py", line 217, in create_book_entry
File "site-packages\calibre\db\cache.py", line 61, in call_func_with_lock
File "site-packages\calibre\db\cache.py", line 1530, in create_book_entry
File "site-packages\calibre\db\backend.py", line 822, in execute
File "c:\cygwin64\home\kovid\sw\build\apsw-3.8.2-r1\src\cursor.c", line 231, in resetcursor
CantOpenError: CantOpenError: unable to open database file


----------------------------------------------------------------------
Failed to add the book: Forgive My Grief Vol I - IV
D:\Books\Forgive My Grief\Forgive_My_Grief_02.mobi
With error:
Traceback (most recent call last):
File "site-packages\calibre\gui2\add.py", line 379, in add_book
File "site-packages\calibre\db\legacy.py", line 217, in create_book_entry
File "site-packages\calibre\db\cache.py", line 61, in call_func_with_lock
File "site-packages\calibre\db\cache.py", line 1530, in create_book_entry
File "site-packages\calibre\db\backend.py", line 822, in execute
File "c:\cygwin64\home\kovid\sw\build\apsw-3.8.2-r1\src\cursor.c", line 231, in resetcursor
CantOpenError: CantOpenError: unable to open database file


----------------------------------------------------------------------
Failed to add the book: Forgive My Grief Vol I - IV
D:\Books\Forgive My Grief\Forgive_My_Grief_03.mobi
With error:
Traceback (most recent call last):
File "site-packages\calibre\gui2\add.py", line 379, in add_book
File "site-packages\calibre\db\legacy.py", line 217, in create_book_entry
File "site-packages\calibre\db\cache.py", line 61, in call_func_with_lock
File "site-packages\calibre\db\cache.py", line 1530, in create_book_entry
File "site-packages\calibre\db\backend.py", line 822, in execute
File "c:\cygwin64\home\kovid\sw\build\apsw-3.8.2-r1\src\cursor.c", line 231, in resetcursor
CantOpenError: CantOpenError: unable to open database file
spynumber is offline   Reply With Quote
Old 02-15-2017, 06:13 PM   #2
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,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by spynumber View Post
When ever I try to add books I get errors. Any ideas what I need to do to fix it? I have copied the log file below:

calibre, version 2.79.1
ERROR: Errors while adding: Failed to add any books, click "Show details" for more information

---------------<snip> ----------------

CantOpenError: CantOpenError: unable to open database file
@spynumber - the ast line of the error messages says it all. The database file the error is referring to is the metadata.db file in the library folder.

Is the metadata.db file there?
Has something else locked it?
Has something changed the file access control permissions?

Are you syncing your library to a cloud storage service, like Dropbox, Amazon S3, OneDrive, Google Drive etc. If so then you need to read this ==>> I am getting errors with my calibre library on a networked drive/NAS?

A cloud storage service is, to all intents and purposes, a network drive.

BR
BetterRed is offline   Reply With Quote
Advert
Old 02-21-2017, 11:40 AM   #3
spynumber
Member
spynumber began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2011
Device: Kindle
The metadata.db file is there. I don't think anything is locking it. I uninstalled Calibre and re-installed it and I still get the same error. I'm syncing to a USB flash drive.
spynumber is offline   Reply With Quote
Old 02-21-2017, 11:58 AM   #4
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,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Syncing?
Only Calibre can can be accessing the Library folder. File sync (backup/shadow) must be paused or you can get lock clashes.

Once Calibre creates a Library. Installation/uninstall will not affect it (except a rare schema upgrade that has not happened in a very long time. Calibre db is STABLE)
theducks is offline   Reply With Quote
Old 02-21-2017, 02:57 PM   #5
spynumber
Member
spynumber began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2011
Device: Kindle
Perhaps "syncing" is the wrong word. When I add books to my Calibre Library that library is located on USB flash drive. So, I cannot figure out what would make my database file unable to be opened. I did try renaming the metadata.db file but when I reopen Calibre all my files are still there. From what I saw in the help section it should have shown nothing in my library if I renamed that file. Am I wrong? When that seemed to make no difference when I add a book, I went ahead and renamed it back to metadata.db and again there is no difference. I have been looking into my preferences and checking for anything that might be causing this problem but I haven't found anything yet.
spynumber is offline   Reply With Quote
Advert
Old 02-21-2017, 05:06 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,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by spynumber View Post
Perhaps "syncing" is the wrong word. When I add books to my Calibre Library that library is located on USB flash drive. So, I cannot figure out what would make my database file unable to be opened.
How much free space on the USB drive?

Where is Calibre installed?

Quote:
Originally Posted by spynumber View Post
I did try renaming the metadata.db file but when I reopen Calibre all my files are still there. From what I saw in the help section it should have shown nothing in my library if I renamed that file. Am I wrong?
No, your not wrong.

If you rename or remove the metadata.db file, then when you open that 'library' in calibre it should create an fresh metadata.db file and you will have an empty library - the author and book folders would still be there of course.

Are you sure that the path of the library you're looking at in your file manager is the same as the one that calibre is accessing.

Try this: With your file manager add a file of some sort into the library folder, name it something like 'test.file'. Start calibre, select a book and press 'O' (to open the book folder), go up the folder tree until you get to the library folder - is 'test.file' there?

BR
BetterRed is offline   Reply With Quote
Old 02-21-2017, 07:59 PM   #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,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Flash drives are slow. Maybe the previous write (to the DB) has not been written (still in disk cache) out and you need to write again, but that is blocking.
Most likely is A/V scanning ever write
theducks is offline   Reply With Quote
Reply

Tags
adding, books, error


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DLL error when adding books HRR Calibre 9 10-15-2015 05:30 AM
Error message - adding books Squash0001 Library Management 3 01-24-2015 12:04 PM
Adding books Error tdwish Conversion 4 01-22-2012 06:37 AM
error adding books Beau Calibre 5 11-02-2010 12:03 PM
Error adding books Gfinch Calibre 2 08-03-2008 08:36 PM


All times are GMT -4. The time now is 05:19 PM.


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