diff --git a/pokemongo_bot/cell_workers/pokemon_transfer_worker.py b/pokemongo_bot/cell_workers/pokemon_transfer_worker.py index fd30f3bd2f..a2b5627661 100644 --- a/pokemongo_bot/cell_workers/pokemon_transfer_worker.py +++ b/pokemongo_bot/cell_workers/pokemon_transfer_worker.py @@ -39,8 +39,11 @@ def _release_pokemon_get_groups(self): pokemon_groups = {} self.api.get_player().get_inventory() inventory_req = self.api.call() - inventory_dict = inventory_req['responses']['GET_INVENTORY'][ - 'inventory_delta']['inventory_items'] + + if inventory_req.get('responses', False) is False: + return pokemon_groups + + inventory_dict = inventory_req['responses']['GET_INVENTORY']['inventory_delta']['inventory_items'] user_web_inventory = 'web/inventory-%s.json' % (self.config.username) with open(user_web_inventory, 'w') as outfile: