Technical error caused by PocketBook default files (invalid continuation byte on device connect)
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/
File "site-packages/
File "site-packages/
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
=======
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.