baniol / kindle-my-clippings

kindle My Clippings.txt parser to JSON / html
MIT License
40 stars 10 forks source link

UnicodeDecodeError #9

Open jdalbey opened 2 years ago

jdalbey commented 2 years ago

Running the script on a "My Clippings.txt" file taken directly from a Kindle produces this error:

Traceback (most recent call last):
  File "./extract-clippings.py", line 151, in <module>
    note_hash = hashlib.sha256(note_text.strip().encode('utf8')).hexdigest()[:8]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 27: ordinal not in range(128)