You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ dispatcher.py:342 handler_worker()] 'utf-16-le' codec can't decode bytes in position 10-11: unexpected end of dataTraceback (most recent call last): File "/home/user/.local/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 329, in handler_worker await handler.callback(self.client, *args) File "/home/user/.local/lib/python3.10/site-packages/pyrogram/handlers/message_handler.py", line 151, in resolve_future_or_callback await self.original_callback(client, message, *args) File "/mnt/c/bot/handlers/test.py", line 38, in test print(message.text[:5]) File "/home/user/.local/lib/python3.10/site-packages/pyrogram/types/messages_and_media/message.py", line 57, in __getitem__ return parser_utils.remove_surrogates(parser_utils.add_surrogates(self)[item]) File "/home/user/.local/lib/python3.10/site-packages/pyrogram/parser/utils.py", line 38, in remove_surrogates return text.encode("utf-16", "surrogatepass").decode("utf-16")UnicodeDecodeError: 'utf-16-le' codec can't decode bytes in position 10-11: unexpected end of data
The text was updated successfully, but these errors were encountered:
SpEcHiDe
added a commit
to TelegramPlayGround/pyrogram
that referenced
this issue
Apr 19, 2024
Checklist
pip3 install -U git+https://github.com/Mayuri-Chan/pyrofork
and reproduced the issue using the latest development versionDescription
There's a crash in message.text (which, btw, is not str - this is not stated in the documentation, which says message.text is a plain str)...
Steps to reproduce
Add the following message handler to the bot and then write this message anywhere the bot is:
Code example
Logs
The text was updated successfully, but these errors were encountered: