View Single Post
Old 02-24-2020, 07:31 AM   #1971
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I have installed and tested the plugins. Everything seems to work except sending an epub. This gives the error:

Code:
calibre, version 4.99.4
ERROR: Error: Error communicating with device

'TypeError' object has no attribute 'message'

Traceback (most recent call last):
  File "calibre_plugins.kobotouch_extended.device.driver", line 263, in _modify_epub
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Development\GitHub\calibrpy3\calibre\src\calibre\gui2\device.py", line 89, in run
  File "E:\Development\GitHub\calibrpy3\calibre\src\calibre\gui2\device.py", line 592, in _upload_books
  File "calibre_plugins.kobotouch_extended.device.driver", line 385, in upload_books
  File "E:\Development\GitHub\calibrpy3\calibre\src\calibre\devices\kobo\driver.py", line 2121, in upload_books
  File "calibre_plugins.kobotouch_extended.device.driver", line 284, in _modify_epub
AttributeError: 'TypeError' object has no attribute 'message'
The line in error is:

Code:
kte_data_file.write(json.dumps(o))
The equivalent line in the output plugin is:

Code:
kte_data_file.write(json.dumps(o).encode("UTF-8"))
davidfor is offline   Reply With Quote