yashrathi-git / headspace-cli

A complete command line interface for Headspace, enabling direct access to meditation sessions from the command line.
https://pypi.org/project/pyheadspace/
MIT License
103 stars 13 forks source link

Unicode encode issue #26

Open naamex opened 1 year ago

naamex commented 1 year ago

Hello,

I'm having an error while executing the code.

UnicodeEncodeError: 'latin-1' codec can't encode character '\u20ac' in position 513: ordinal not in range(256)

Could you please assist me in resolving this issue?

Thank you.

anaemic commented 1 year ago

I had this same issue and performed the hackiest, most terrible solution but it worked.

That error leads me to the file "/usr/lib/python3.11/http/client.py" line 1259 where by changing the string one_value.encode('latin-1') to one_value.encode('UTF-8') and saving the file you can run headspace downloader just fine and get your files, albeit with a slightly borked interface.

I immediately undid the change afterwards and recommend you do too.