I got an error when running gen.py with --simulate. Apparently the script fails when trying to decode the "zany-face"-Emoji.
╭─lerk@comm ~/mstdn-ebooks ‹master*›
╰─$ python3 ./gen.py --simulate
Traceback (most recent call last):
File "./gen.py", line 39, in <module>
print(toot['toot'])
UnicodeEncodeError: 'ascii' codec can't encode character '\U0001f92a' in position 100: ordinal not in range(128)
I do understand what the error is, though. I'll update the script so that if it fails to print the first time, it strips out any non-Unicode characters and tries again.
I got an error when running
gen.py
with--simulate
. Apparently the script fails when trying to decode the "zany-face"-Emoji.Can I ignore invalid characters somehow?