From 494bc055543c3cb674cca781ec545311d3c9bad1 Mon Sep 17 00:00:00 2001 From: Wellington Castello Date: Mon, 1 Aug 2016 07:24:14 -0700 Subject: [PATCH] Let the user know that the maps api key exceeded its limits. (#1989) --- pokecli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pokecli.py b/pokecli.py index c52c8c70a6..1785edcdaa 100755 --- a/pokecli.py +++ b/pokecli.py @@ -36,6 +36,7 @@ from datetime import timedelta from getpass import getpass from pgoapi.exceptions import NotLoggedInException +from geopy.exc import GeocoderQuotaExceeded from pokemongo_bot import PokemonGoBot, TreeConfigBuilder from pokemongo_bot import logger @@ -76,6 +77,9 @@ def main(): except NotLoggedInException: logger.log('[x] Error while connecting to the server, please wait %s minutes' % config.reconnecting_timeout, 'red') time.sleep(config.reconnecting_timeout * 60) + except GeocoderQuotaExceeded: + logger.log('[x] The given maps api key has gone over the requests limit.', 'red') + finished = True except: # always report session summary and then raise exception report_summary(bot)