Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telegram.error.RetryAfter: Flood control exceeded #66

Closed
anhntsi opened this issue Apr 26, 2021 · 3 comments
Closed

telegram.error.RetryAfter: Flood control exceeded #66

anhntsi opened this issue Apr 26, 2021 · 3 comments

Comments

@anhntsi
Copy link

anhntsi commented Apr 26, 2021

Hi I have install the bot on my raspberry pi with python 3.7.3 but I get this error:

2021-04-27 06:40:14,524 - btb_manager_telegram_logger - INFO - Retrieving Telegram token and chat_id from apprise.yml file.
2021-04-27 06:40:14,540 - btb_manager_telegram_logger - INFO - Successfully retrieved Telegram configuration. The bot will only respond to user in the chat with chat_id 1321341011
2021-04-27 06:40:15,542 - btb_manager_telegram_logger - INFO - Checking for updates.
2021-04-27 06:40:17,000 - btb_manager_telegram_logger - INFO - BTB Manager Telegram update found.
2021-04-27 06:40:21,123 - btb_manager_telegram_logger - INFO - Binance Trade Bot update found.
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/binance/BTB-manager-telegram/btb_manager_telegram/__main__.py", line 126, in <module>
    pre_run_main()
  File "/home/pi/binance/BTB-manager-telegram/btb_manager_telegram/__main__.py", line 70, in pre_run_main
    scheduler.run(blocking=False)
  File "/usr/lib/python3.7/sched.py", line 151, in run
    action(*argument, **kwargs)
  File "/home/pi/binance/BTB-manager-telegram/btb_manager_telegram/utils.py", line 174, in update_checker
    bot.close()
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 127, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 4966, in close
    return self._post('close', timeout=timeout)  # type: ignore[return-value]
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 260, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 354, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 265, in _request_wrapper
    message = str(self._parse(resp.data))
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 223, in _parse
    raise RetryAfter(retry_after)
telegram.error.RetryAfter: Flood control exceeded. Retry in 598.0 seconds

How do I fix it?

@lorcalhost
Copy link
Owner

lorcalhost commented Apr 27, 2021

I will look into this.
For a quick fix you can manually update binance-trade-bot by running the git pull command inside the binance-trade-bot directory.

Make sure you are not running multiple bots with the same Telegram API credentials at the same time.

@lorcalhost
Copy link
Owner

Hopefully fixed in 39aa660

@titulebolide
Copy link
Collaborator

It did not fixed it, however I pushed something on fix/flood-control that might do the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants