View Single Post
Old 08-09-2010, 09:13 AM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kgn View Post
I cannot send books - the device will not connect. This is what happens when I plug in the PB302.

Basically the same as the old driver.....
I don't think my theory is correct, because there is no evidence in the log that the metadata.calibre file was opened for write before the permission denied error happened. It was successfully opened for read.

The exception is being thrown when the file is opened for write, not at the write itself. That open hasn't changed since 0.7.0, which points at something wrong with either the metadata.calibre file, the memory itself, or some mysterious sequence of operations. Six experiments to try come to mind. The first 4 are benign. The last two, and especially the last one, are more dangerous.

In the experiments below, in all cases start calibre with calibre-debug -g, so we can get the debug output. If you wish, you can delete the experimental driver.

1) I note that you have both memory and a card. Try the experiment with the card not in the device.

2) Start calibre, then plug in the device. Using a text editor that supports Unix-format line endings (\n), open the file f:\calibre.metadata, then write it back. The goal of the experiment is to find if you get a permission denied error on the save, with calibre running and having opened the file.

3) Ensure calibre is not running. Plug in the device. Copy (not move) the metadata.calibre off the device, then delete the file. Unplug the device, then plug it back in. Copy the file back. Start calibre and try to add a book.

4). Ensure calibre is not running. Add a book to the device main memory by hand, by copying the book to the device. Start calibre. You should see a line saying 'need sync = true' in the debug output, and calibre will attempt to write the file. If the exception is not raised, then the problem is being introduced later.

5) (more radical) Delete the metadata.calibre file. Start calibre. Wait some amount of time while metadata.calibre is being rebuilt. The problem with this approach is that the cached metadata is lost. When calibre rebuilds it from information in the files, the metadata could be wrong, making the OnDevice indications incorrect.

6) (most radical) Format the memory and resend all the books.
chaley is offline   Reply With Quote