error communicating with device

Bug #2069006 reported by Sithpon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Charles Haley

Bug Description

I am encountering an issue when trying to connect KOReader with Calibre via wireless. I can send books to KOReader normally, but there is no checkmark on the books that have been sent, and I can't see the list of books on the device from Calibre.

Here are the details:

calibre, version 7.12.0
ERROR: Error: Error communicating with device

'uuid'

Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/device.py", line 111, in run
    self.result = self.func(*self.args, **self.kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/gui2/device.py", line 565, in _books
    mainlist = self.device.books(oncard=None, end_session=False)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/devices/smart_device_app/driver.py", line 57, in _synchronizer
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/devices/smart_device_app/driver.py", line 1316, in books
    book = self._metadata_in_cache(r['uuid'], r['lpath'],
                                   ~^^^^^^^^
KeyError: 'uuid'

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

Changing the component for this bug.

 assignee
 status

Changed in calibre:
assignee: nobody → Charles Haley (cbhaley)
status: New → Triaged
Revision history for this message
Charles Haley (cbhaley) wrote :

1) I do not provide support for people using distro provided packages. If
you are using a distro provided package, uninstall it and install the
official calibre binary from https://calibre-ebook.com/download_linux

2) It doesn't fail for me using my legacy version of Calibre Companion
running calibre 7.12 on Windows 10. I don't have a koreader installation
to test. If this problem isn't fixed by running the official calibre
binary then someone with koreader will need to look at the problem
and provide repeatable debugging information.

Changed in calibre:
status: Triaged → Invalid
Revision history for this message
Sithpon (sithpon) wrote :

Thank you for your response. It turns out the problem wasn’t with Calibre after all. The issue came up because I reinstalled Koreader and then copied my old backup files over the new installation. Once I did a fresh install of Koreader and connected it to Calibre, everything worked fine.

Thanks a lot for your help, and sorry for any hassle this might have caused.🙏

Revision history for this message
lightmaster (lightmaster-tech) wrote :

I stumbled upon this same issue, however I did not transfer the entire KOReader install to my new ereader, just the books folder and the settings files. I also tried deleting the books folder (and metadata file) and moving the books over fresh and still came to this error again, so it must be an issue with a setting in the settings files.

Is this error coming from Calibre itself, or the wireless driver? It sounds to me like it might be a mismatch between the UUID that's being reported by KOReader and the driver? If so, that seems like something that could be corrected with a prompt and being asked if you'd like to overwrite it with the correct value.

Revision history for this message
Charles Haley (cbhaley) wrote :

From what I can see from the exception, koreader isn't transferring the same book uuid (or any book uuid) to calibre for every book, in at least some cases. That process happens on a non-gui thread in the wireless driver so no prompts are possible.

It is possible that koreader had a problem sending the uuid and subsequently fixed it. In this case the cached metadata kept by the wireless driver could be stale/wrong. You can try deleting the cache file, which in windows is at C:\Users\***USERNAME***\AppData\Local\calibre-cache\wireless_device.....

You can also tell the driver not to use metadata caching by unchecking the box "Use metadata cache" in the driver settings. Unsetting this box will make the connection process significantly slower but might work around whatever koreader is doing.

Revision history for this message
lightmaster (lightmaster-tech) wrote :

I did try what the other guy said fixed it for him and started with a fresh install of KOReader and an empty books folder. That didn't help.

I deleted all the "wireless_device" files in the cache folder, and still got the error. I then tried unchecking "Use metadata cache" and while it didn't throw the error on connection, if I look at the device's book list in Calibre, it shows up as "Unknown" for the book that's on there, and if I try to delete that book from the device using Calibre, I get the UUID error again:

calibre, version 7.12.0
ERROR: Error: Error communicating with device

'uuid'

Traceback (most recent call last):
  File "calibre\gui2\device.py", line 111, in run
  File "calibre\gui2\device.py", line 670, in _delete_books
  File "calibre\devices\smart_device_app\driver.py", line 57, in _synchronizer
  File "calibre\devices\smart_device_app\driver.py", line 1544, in delete_books
KeyError: 'uuid'

Gonna make a bug report on KOReader about this. On my Kobo Libra Colour, I have to run the development build since the official release doesn't have support for the new Colour eReaders, but on my older Kobo Libra 2, the latest official KOReader works with Calibre wireless, but when it's updated to the latest development build, this error pops up. Sounds like it's definitely a KOReader issue.

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.