Skip to content

[BUG] latest update broke something with time of the message #1935

@91DarioDev

Description

@91DarioDev

After upgrading the library from 12.6.1 to 12.7 I get this error with any change on my side to the code

ERROR: can't compare offset-naive and offset-aware datetimes

  File "/home/chatincognitobot/.local/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 343, in process_update
    handler.handle_update(update, self, check, context)
  File "/home/chatincognitobot/.local/lib/python3.5/site-packages/telegram/ext/handler.py", line 119, in handle_update
    return self.callback(update, context)
  File "/home/chatincognitobot/bot/commands.py", line 65, in revokeMessageCommand
    othercommands.revokeMessage(context.bot, update)
  File "/home/chatincognitobot/bot/othercommands.py", line 80, in revokeMessage
    if datetime.datetime.now() > update.message.reply_to_message.date+datetime.timedelta(seconds=seconds):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions