Technical error caused by PocketBook default files (invalid continuation byte on device connect)

Bug #1467433 reported by Mekk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

(this but is strictly speaking caused by wrongly named files on the device, still, as those files are installed by default device update, various users may face them, so this may make sense to cover the problem a bit…)

A few weeks ago I performed firmware update on my PocketBook 623. Since then, attempts to use it from Calibre (on Ubuntu) resulted in the following error during book scan:

==================================================================================
calibre, version 2.31.0
ERROR: Error: Error communicating with device

'utf8' codec can't decode byte 0xe1 in position 1: invalid continuation byte

Traceback (most recent call last):
  File "site-packages/calibre/gui2/device.py", line 87, in run
  File "site-packages/calibre/gui2/device.py", line 503, in _books
  File "site-packages/calibre/devices/usbms/driver.py", line 215, in books
  File "os.py", line 286, in walk
  File "posixpath.py", line 78, in join
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 1: invalid continuation byte
==================================================================================

The problem turned out to be caused by PocketBook usage instructions in various languages installed by the update – once I removed *PocketBook.pdf from the root of the mounted device, the problem was gone. Here is how they visualised on my system:

===================================================================================
/media/usb0$ ls *PocketBo*.pdf
Instrukcja u?ytkowania PocketBook.pdf
Lietot?ja rokasgr?mata PocketBook.pdf
Manual de utilizare PocketBook.pdf
Manuel d'utilisation PocketBook.pdf
Naudotojo vadovas PocketBook.pdf
N?vod k pou?it? PocketBook.pdf
N?vod na pou??vanie PocketBook.pdf
???????? ??????????? PocketBook.pdf
?????????? ? PocketBook.pdf
?????????? ? PocketBook.pdf
??????????? ?? ??????????? PocketBook.pdf
??????????? ???????????? PocketBook.pdf
User Manual PocketBook.pdf
User Start Guide PocketBook.pdf
===================================================================================

Revision history for this message
Mekk (marcin-kasperski) wrote :

I would suggest handling file naming problems a little bit:

a) either simply ignore files with unparsable names, and keep working

or

b) fail, but point out specific problematic file so the user have chance to resolve the problem.

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

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
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.