EDM115 / unzip-bot

Telegram bot deployable to heroku that can extract every archive !
https://t.me/unzip_edm115bot
MIT License
98 stars 128 forks source link

[BUG] Eval fails and I'm too tired to understand why #329

Open EDM115 opened 3 months ago

EDM115 commented 3 months ago

Sent : /eval unzipperbot.send_message(chat_id=854158484, text="yo")

Logs :

2024-08-01 21:58:15,463 - INFO - unzipper - MainThread - stdout:
2024-08-01 21:58:15,463 - INFO - unzipper - MainThread - stderr: ValueError : malformed node or string on line 1: <ast.Call object at 0x7f885875d210>
2024-08-01 21:58:15,536 - ERROR - pyrogram.dispatcher - MainThread - Telegram says: [400 ENTITY_BOUNDS_INVALID] - The message entity bounds are invalid (caused by "messages.EditMessage")
Traceback (most recent call last):
  File "/venv/lib/python3.12/site-packages/pyrogram/dispatcher.py", line 240, in handler_worker
    await handler.callback(self.client, *args)
  File "/venv/lib/python3.12/site-packages/pyromod/listen/listen.py", line 93, in resolve_listener
    await self.user_callback(client, message, *args)
  File "/app/unzipper/modules/commands.py", line 722, in eval_command
    await status_message.edit(final_output)  File "/venv/lib/python3.12/site-packages/pyrogram/types/messages_and_media/message.py", line 2803, in edit_text
    return await self._client.edit_message_text(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/pyrogram/methods/messages/edit_message_text.py", line 82, in edit_message_text
    r = await self.invoke(
        ^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/pyrogram/methods/advanced/invoke.py", line
79, in invoke
    r = await self.session.invoke(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 389, in
invoke
    return await self.send(query, timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/pyrogram/session/session.py", line 357, in
send
    RPCError.raise_it(result, type(data))
  File "/venv/lib/python3.12/site-packages/pyrogram/errors/rpc_error.py", line 91, in
raise_it
    raise getattr(
pyrogram.errors.exceptions.bad_request_400.EntityBoundsInvalid: Telegram says: [400 ENTITY_BOUNDS_INVALID] - The message entity bounds are invalid (caused by "messages.EditMessage")
EDM115 commented 3 months ago

will sort this out later on

also I might need to expose some variables to make it work