View Single Post
Old 02-21-2019, 01:25 AM   #2
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,741
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
You'll have to use decode():

Spoiler:
Code:
def run(bk):
    try:
        px2em = Px2Em()
        for id_file, href in bk.css_iter():
            if bk.launcher_version() <= 20151001: # Sigil-0.8.901 
                data = bk.readfile(id_file).decode('utf-8')
            else:
                data = bk.readfile(id_file)
            px2em._read(data)
            px2em._replace()

            px2em._update(bk, id_file)
    except:
        print(str(sys.exc_info()[0]) + " : " + str(sys.exc_info()[1]))

    return 0
Doitsu is offline   Reply With Quote