Error Communicating With Device - Sony PRS-T1 eReader

Bug #890553 reported by David Morgan
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

Error message provided as follows:

QUOTE
calibre, version 0.8.26
ERROR: Error: Error communicating with device

database disk image is malformed

Traceback (most recent call last):
  File "site-packages/calibre/gui2/device.py", line 81, in run
  File "site-packages/calibre/gui2/device.py", line 332, in _books
  File "site-packages/calibre/devices/prst1/driver.py", line 160, in books
  File "site-packages/calibre/devices/usbms/driver.py", line 242, in books
  File "site-packages/calibre/devices/prst1/driver.py", line 239, in sync_booklists
  File "site-packages/calibre/devices/prst1/driver.py", line 267, in update_device_database
  File "site-packages/calibre/devices/prst1/driver.py", line 282, in update_device_books
DatabaseError: database disk image is malformed
UNQUOTE

In short, the Sony Reader WiFi Touch is detected by Calibre; but there's no visibility of Reader contents on Calibre. However, if an EPUB is dragged & dropped into the device from Calibre library, upon disconnecting the eReader, the EPUB is shown to have been successfully moved. Very frustrating.

I'm running 10.04 LTS Lucid Lynx Ubuntu software.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 890553

The db on your reader is corrupted. Delete it and then reconnect your reader.
The db is Sony_Reader/database/books.db

And feel free to complain to SONY about their crappy firmware.

 status invalid

Changed in calibre:
status: New → Invalid
Revision history for this message
Pablo180 (paultait22) wrote :

I had the exact same problem from about Calibre version 0.8.26 onwards, and I am also using 10.04 LTS Lucid Lynx and the Sony Reader PRS-T1.

Initially it seemed to be intermittent, occasionally the database corrupted error would appear and if I reset the device or rebooted my computer it would connect fine, then at some point again after several connections the same error would pop up.

Recently it became constant and I could not see the books on my device at all, but could copy books to it, exactly as described above. The strange thing is, even though the database was apparently corrupted, it would connect fine in the Sony Reader Software and also in Calibre on Windows - it was just my main computer running Lucid that had connection problems.

I tried re-installing Calibre, deleting Calibre's database and Library etc, that didn't work. In the end I followed the advice above and it worked, but obviously I lost all my books and notes.

Naturally I am concerned that this might happen again and that the reason for it isn't that 'The SONY database is corrupted. Delete the file %s on your reader' or 'database disk image is malformed' or a problem with the device at all, but a problem with Calibre itself?

Revision history for this message
Andrey (iloveeclipse) wrote :

This bug hits me immediately after few minutes working with the reader + calibre.

How do you define / conclude the "corruptness" of the file in question?
I saw this error after deleting a book (from the reader UI) which was previously copied by calibre to the reader.
Could it be that the books.db has now one entry less than some internal calibre database, and so calibre expects to find non-existing data on the reader?

Regards,
Andrey

Revision history for this message
Kovid Goyal (kovid) wrote :

Corruption is when the db is so badly corrupted that it cannot even be opened
by the sqlite library.

Revision history for this message
Andrey (iloveeclipse) wrote :

Ok, thanks for the clarification. Could you then please fix the error message saying: "Delete the file %s on your reader"?

The argument for %s seems to be forgotten in the code, the message should read "Delete the file "Sony_Reader/database/books.db" on your reader".
I also would mention what does it mean for the user: "this file will be automatically re-generated by the next time reader scans the books", or something like this.

Revision history for this message
Pablo180 (paultait22) wrote :

That is also what seems to cause the problem for me too Andrey. If I use the reader to delete a book, I get the error message sooner or later. If I use only calibre to add/remove books, I have no problems.

If you have only deleted one book using the reader, you may still be able to put it back on the reader with calibre (you should still be able to copy files to it) and then after a restart it sometimes corrects itself. I've done this myself a few times and it tends to work with just the one book, but the more books and the longer it was since it was deleted the less likely it is to work.

Were I you Andrey, I would try that first, you may get lucky, before deleting all your books and notes from the device by deleting Sony_Reader/database/books.db.

The only workaround seems to be to ONLY use calibre to manage the books on the device. I haven't had the error since doing that.

Revision history for this message
Andrey (iloveeclipse) wrote :

So actually I did exactly this - I just deleted the file Sony_Reader/database/books.db and the reader was able to "discover" all existing books.
And yes, it seems that one shouldn't manage books by the reader itself as soon as one uses Calibre, but this is not nice...

Anyway, thanks for this great piece of software - it is *very* good and a time/life saver :-)
Regards,
Andrey

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.