View Single Post
Old 01-10-2017, 12:53 PM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Leonatus View Post
Each time I run the plugin, I get this error:
Code:
TypeError: sequence item 1: expected a bytes-like object, str found
Error: sequence item 1: expected a bytes-like object, str found
.
Did I misunderstand something?
Sigil v. 0.9.7, Windows 10, 32 bit.
I'm getting the same error message for certain commercial epubs. It looks like there's a bug in the plugin code. Until the author releases an official bugfix try the following:

1. Locate the Kepub Plugin folder (Edit > Preferences > Peferences Location).
2. Open kepubify.py and locate the following line:

Code:
root = re.sub(b'<p[^>/]*/>', '<p></p>', root).decode('utf-8')
3. Change it to:

Code:
root = re.sub(b'<p[^>/]*/>', b'<p></p>', root).decode('utf-8')
This should fix the issue.

Last edited by Doitsu; 01-10-2017 at 02:52 PM.
Doitsu is offline   Reply With Quote