marianosimone / epub-thumbnailer

Script to extract the cover of an epub book and create a thumbnail for it
GNU General Public License v3.0
191 stars 29 forks source link

fix check 'Ebook thumbnailer' on python3 #25

Closed xtrymind closed 5 years ago

xtrymind commented 5 years ago

i don't know it is just me or anyone else have same problem, but since migrate to python3, i got typeError:

Traceback (most recent call last):
  File "install.py", line 182, in <module>
    commands[args.action]()
  File "install.py", line 156, in install
    add_thumbnailer_to_tumbler()
  File "install.py", line 101, in add_thumbnailer_to_tumbler
    if config_content.find('# Ebook thumbnailer') == -1:
TypeError: a bytes-like object is required, not 'str 

i'm using Arch Linux and python 3.7.3

marianosimone commented 5 years ago

Thanks for catching, @xtrymind . I just tried this on Python 2.7 and it also works, so using b'' looks good to me

xtrymind commented 5 years ago

@marianosimone yeah, it works on python2 too, fix it long way back xtrymind/epub-thumbnailer@f790b4fea75b but that time i'm not sure about migrate to python3 :grin: