Calibre 4.23 on Fedora 34. Trying to connect a Huawei Mediapad T5 (Android 8).
I'm using simple-mtpfs package for mtp connectivity.
Code:
'str' object has no attribute 'decode'
Traceback (most recent call last):
File "/usr/lib64/calibre/calibre/gui2/device.py", line 90, in run
self.result = self.func(*self.args, **self.kwargs)
File "/usr/lib64/calibre/calibre/gui2/device.py", line 513, in _books
mainlist = self.device.books(oncard=None, end_session=False)
File "/usr/lib64/calibre/calibre/devices/mtp/driver.py", line 216, in books
self.get_driveinfo() # Ensure driveinfo is loaded
File "/usr/lib64/calibre/calibre/devices/mtp/driver.py", line 188, in get_driveinfo
self._update_drive_info(self.filesystem_cache.storage(sid), location_code)
File "/usr/lib64/calibre/calibre/devices/mtp/driver.py", line 178, in _update_drive_info
self.put_calibre_file(storage, 'driveinfo', BytesIO(raw), len(raw))
File "/usr/lib64/calibre/calibre/devices/mtp/driver.py", line 149, in put_calibre_file
self.put_file(parent, path[-1], stream, size)
File "/usr/lib64/calibre/calibre/devices/mtp/base.py", line 24, in synchronizer
return func(self, *args, **kwargs)
File "/usr/lib64/calibre/calibre/devices/mtp/unix/driver.py", line 406, in put_file
%(name, parent.full_path, self.format_errorstack(errs)))
File "/usr/lib64/calibre/calibre/devices/mtp/unix/driver.py", line 211, in format_errorstack
return '\n'.join(['%d:%s'%(code, msg.decode('utf-8', 'replace')) for
File "/usr/lib64/calibre/calibre/devices/mtp/unix/driver.py", line 211, in <listcomp>
return '\n'.join(['%d:%s'%(code, msg.decode('utf-8', 'replace')) for
AttributeError: 'str' object has no attribute 'decode'