chatGPT-telegram-bot icon indicating copy to clipboard operation
chatGPT-telegram-bot copied to clipboard

IndexError: list index out of range - get_last_message

Open BibiPush opened this issue 2 years ago • 7 comments

I got everything working except I don't receive the bot responses on the telegram app. However they show up in Chromium.

(base) C:\GPT-3\chatGPT-telegram-bot-main>python server.py
2022-12-05 18:49:36,080 - apscheduler.scheduler - INFO - Scheduler started
2022-12-05 18:49:36,080 - telegram.ext._application - INFO - Application started
2022-12-05 18:49:45,705 - telegram.ext._application - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "C:\Users\admin\anaconda3\lib\site-packages\telegram\ext\_application.py", line 1042, in process_update
    await coroutine
  File "C:\Users\admin\anaconda3\lib\site-packages\telegram\ext\_handler.py", line 143, in handle_update
    return await self.callback(update, context)
  File "C:\GPT-3\chatGPT-telegram-bot-main\server.py", line 111, in wrapper
    await func(update, context)
  File "C:\GPT-3\chatGPT-telegram-bot-main\server.py", line 173, in echo
    response = get_last_message()
  File "C:\GPT-3\chatGPT-telegram-bot-main\server.py", line 81, in get_last_message
    last_element = page_elements[-1]
IndexError: list index out of range

BibiPush avatar Dec 05 '22 23:12 BibiPush