Closed erivan-as closed 7 years ago
Python 3.6.0 (default, Jan 1 2017, 18:45:22)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print('\U0001f602')
😂
Image, in case the browser messed up:
You got an emoji here. Emojis aren't ASCII.
Python 2 doesn't use unicode for strings.
That's why the line in updates.py:903
blows up:
data['text'] = str(array.get('text')) if array.get('text') is not None else None
The best solution is probably to upgrade to python 3, because you will probably also run into errors using unicode on your program, python 2 just isn't made for unicode. In the end using a chat messanger without emojis isn't fun.
Nevertheless, I will also work on supporting python 2 for the next release.
Ok,
Thanks for attention. Good job, congratulations for pytgbot
Erivan
Hi @luckydonald , I am studing this package and while testing the examples I was catched by the error mencioned above. How can I overcome this error?
Error message displayed
P.S: I am using Ubuntu 16.04
Erivan