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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-28-2013, 04:41 AM   #1
canadianbill
Junior Member
canadianbill began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2013
Location: United Kingdom
Device: Kindle
Calibre 64 - adding books gives errors on network drive

Hello,

calibre version 0.9.28 [64bit]

I use Windows 7 and I store my eBooks on an external server which is always accessible.

However when I try adding books or amending metadata for books I sometimes get:

ERROR: Failed(64, 'ReadFile', 'The specified network name is no longer available.')

Traceback (most recent call last):
File "site-packages\calibre\gui2\dialogs\metadata_bulk.py", line 125, in do_one_safe
File "site-packages\calibre\gui2\dialogs\metadata_bulk.py", line 177, in do_one
File "site-packages\calibre\library\database2.py", line 2526, in set_authors
File "site-packages\calibre\library\database2.py", line 652, in set_path
File "site-packages\calibre\library\database2.py", line 1527, in add_format
File "site-packages\calibre\library\database2.py", line 1374, in copy_format_to
File "site-packages\calibre\utils\filenames.py", line 326, in copy_path_to
error: (64, 'ReadFile', 'The specified network name is no longer available.')

At this point calibre 64 normally becomes 'stuck' and I have to close it down via Task Manager. Although sometimes when it looks like it is working again and I try to resave edits, I get:

ERROR: Unhandled exception

DatabaseException: database is locked RemoteTraceback (most recent last call): File "site-packages\calibre\library\sqlite.py", line 272, in run OperationalError: database is locked

Traceback (most recent call last):
File "site-packages\calibre\gui2\ui.py", line 819, in closeEvent
File "site-packages\calibre\gui2\ui.py", line 729, in write_settings
File "site-packages\calibre\gui2\init.py", line 306, in save_layout_state
File "site-packages\calibre\gui2\library\views.py", line 378, in save_state
File "site-packages\calibre\gui2\library\views.py", line 372, in write_state
File "site-packages\calibre\library\prefs.py", line 61, in set
File "site-packages\calibre\library\prefs.py", line 56, in __setitem__
File "site-packages\calibre\library\sqlite.py", line 315, in run
DatabaseException: database is locked
RemoteTraceback (most recent call last):
File "site-packages\calibre\library\sqlite.py", line 272, in run
OperationalError: database is locked


Any thoughts or suggestions as to how to deal with these issues?

Kind regards,
Bill
canadianbill is offline   Reply With Quote
Old 04-28-2013, 06:13 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,046
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Calibre does not officially support network drives - so if it works for you then you are lucky! Kovid has said that there are issues with some networked filesystems around database access and locking which seems to be consistent with your symptoms.

Having said that, I run with the library on a network drive (mapped to a drive letter), but the metadata.db file held locally and that seems to be reliable and give reasonable performance. It does mean that I need to remember to sync the local metadata.db file back to the network copy of the library to keep it complete but that is easy enough to automate.
itimpi is offline   Reply With Quote
Old 04-28-2013, 08:37 AM   #3
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: 25,751
Karma: 4998511
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://manual.calibre-ebook.com/faq....rked-drive-nas
kovidgoyal is online now   Reply With Quote
Old 04-29-2013, 12:31 PM   #4
canadianbill
Junior Member
canadianbill began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Apr 2013
Location: United Kingdom
Device: Kindle
Ok thanks for those suggestions. I will use a local copy and use my network drive for backup purposes. At least most eBooks are not large in size like media files.

Regards,
Bill
canadianbill is offline   Reply With Quote
Old 05-17-2013, 10:56 AM   #5
ScottAA
Junior Member
ScottAA began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: Nook Color
Quote:
Originally Posted by kovidgoyal View Post
Are there any plans to make Calibre friendly to network drives in the future?

Currently my calibre library takes up over 10% of the local hard drive, and ebooks are exactly the sort of static media files that are optimal for network drive storage.

I'd like to free up the space used by the actual ebooks, and keep the Calibre database itself on the local drive.

I see from the link above that there are issues with doing that - but are there any plans to ever tackle them and officially support this separation?
ScottAA is offline   Reply With Quote
Old 05-17-2013, 11:59 AM   #6
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,046
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
I think that many of the issue with network drives relate to the handling of the metadata.db file over the network, and in particular record locking.

I run my system with the Calibre library on the network (via a mapped drive) , but my metadata.db file held locally with its location specified by the CALIBRE_OVERRIDE_DATABASE_PATH environment variable. I launch Calibre via a batch file that sets this up. This seems to work without any issues for me. I then have the batch file I use to launch Calibre set to copy the metadata.db file back from the local location to the Calibre library held on the network drive.

I am not sure if this is an officially supported way of working but it does seem to run error free,
itimpi is offline   Reply With Quote
Old 05-17-2013, 03:50 PM   #7
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,043
Karma: 3824376
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Ubuntu Linux, Cybook Opus, Motorola Xoom with Mantano Premium
I use NFS to connect to my NAS, from Ubuntu, and calibre seems to work flawlessly with the library on a network drive that way. I have never noticed any problems. However, I still have metadata.db on a local filesystem, on a SSD drive. I am trying to convince myself that it improves performance.
Adoby is offline   Reply With Quote
Old 05-17-2013, 04:12 PM   #8
ScottAA
Junior Member
ScottAA began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: Nook Color
Quote:
Originally Posted by itimpi View Post
I run my system with the Calibre library on the network (via a mapped drive) , but my metadata.db file held locally with its location specified by the CALIBRE_OVERRIDE_DATABASE_PATH environment variable. I launch Calibre via a batch file that sets this up. This seems to work without any issues for me. I then have the batch file I use to launch Calibre set to copy the metadata.db file back from the local location to the Calibre library held on the network drive.
That sounds like how I'd like it to work, I'll give it a try.

I'm wondering about that last step you mention, though. I'm on a Mac and there are issues with launching apps from shell scripts (batch file equivalent). Why do you need to copy the metadata.db back to the network drive?
ScottAA is offline   Reply With Quote
Old 05-17-2013, 07:19 PM   #9
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,046
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by ScottAA View Post
Why do you need to copy the metadata.db back to the network drive?
I do not HAVE to do so. I like to do it so that calibre library folder on the network drive is self-contained for backup purposes.
itimpi is offline   Reply With Quote
Old 05-17-2013, 07:58 PM   #10
ScottAA
Junior Member
ScottAA began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: Nook Color
Makes sense, thanks for the tips!
ScottAA is offline   Reply With Quote
Old 05-17-2013, 08:54 PM   #11
theducks
Grand Sorcerer
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: 14,470
Karma: 5567061
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by ScottAA View Post
Makes sense, thanks for the tips!
Calibre Library has two parts:
1)the metadata.db (SQL)
2)the book file and folder

These need to happen as a 'transaction'.
If something delays/blocks a file write, the linkage gets fubared
theducks is offline   Reply With Quote
Old 05-17-2013, 11:34 PM   #12
ScottAA
Junior Member
ScottAA began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: Nook Color
Quote:
Originally Posted by theducks View Post
Calibre Library has two parts:
1)the metadata.db (SQL)
2)the book file and folder

These need to happen as a 'transaction'.
If something delays/blocks a file write, the linkage gets fubared
So are you saying it's a bad idea to do what itimpi is doing?
ScottAA is offline   Reply With Quote
Old 05-18-2013, 12:19 AM   #13
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,046
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by ScottAA View Post
So are you saying it's a bad idea to do what itimpi is doing?
The statement s true as far as it goes. It applies regardless of where the datbase is held. Holding the database locally means this is actually less likely to happen as it handling the database across a network connection that is suspect.
itimpi is offline   Reply With Quote
Reply

Tags
calibre 64-bit, callibre 0.9.28, network error

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre with library on mapped network drive litiki777 Related Tools 1 10-30-2012 05:31 AM
using shared network drive on 2 computers elricks Library Management 13 12-21-2011 07:07 AM
eliminate the usb cable and connect wirelessly as a network drive alansplace Amazon Kindle 19 11-24-2011 09:19 AM
Handle Network Drive as Kindle kranu Devices 3 03-08-2011 03:22 AM
iPad Calibre errors wont add books to device stustaff Calibre 9 06-07-2010 06:10 AM


All times are GMT -4. The time now is 09:02 AM.


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