我启动了该漫游器的电报,没有错误,我向该漫游器写了一条短信,并弹出错误消息,这是什么问题?

时间:2020-10-22 21:00:30

标签: python-3.x telegram-bot

C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\python.exe C:/Users/xxlda/PycharmProjects/python-telegram-bot/app.py
Cause exception while getting updates.
Traceback (most recent call last):
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 359, in start_polling
    updates = await self.bot.get_updates(limit=limit, offset=offset, timeout=timeout)
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\bot.py", line 95, in get_updates
    result = await self.request(api.Methods.GET_UPDATES, payload)
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\base.py", line 200, in request
    return await api.make_request(self.session, self.__token, method, data, files,
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\api.py", line 104, in make_request
    return check_result(method, response.content_type, response.status, await response.text())
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\api.py", line 82, in check_result
    exceptions.ConflictError.detect(description)
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\utils\exceptions.py", line 137, in detect
    raise err(cls.text or description)
aiogram.utils.exceptions.TerminatedByOtherGetUpdates: Terminated by other getupdates request; make sure that only one bot instance is running
Cause exception while getting updates.
Traceback (most recent call last):
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 359, in start_polling
    updates = await self.bot.get_updates(limit=limit, offset=offset, timeout=timeout)
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\bot.py", line 95, in get_updates
    result = await self.request(api.Methods.GET_UPDATES, payload)
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\base.py", line 200, in request
    return await api.make_request(self.session, self.__token, method, data, files,
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\api.py", line 104, in make_request
    return check_result(method, response.content_type, response.status, await response.text())
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\bot\api.py", line 82, in check_result
    exceptions.ConflictError.detect(description)
  File "C:\Users\xxlda\AppData\Local\Programs\Python\Python38-32\lib\site-packages\aiogram\utils\exceptions.py", line 137, in detect
    raise err(cls.text or description)
aiogram.utils.exceptions.TerminatedByOtherGetUpdates: Terminated by other getupdates request; make sure that only one bot instance is running

我启动了机器人的电报,没有错误,我向该机器人写了一条短信,并弹出错误消息,这是什么问题?

这里不是github的链接,完全是我的机器人-https://github.com/bloodyt3ars/python-telegram-bot.git

1 个答案:

答案 0 :(得分:0)

确保只有一个机器人实例正在运行,这意味着您应该是唯一一次使用该机器人令牌的人,并确保您不要在任何服务器(例如heroku ...或其他控制台)上运行该机器人之后,您可以运行代码