pmariglia / showdown

A Pokemon Showdown Battle Bot written in Python
GNU General Public License v3.0
254 stars 176 forks source link

KeyError: 'pikachusinnoh' #1

Closed yuzeh closed 5 years ago

yuzeh commented 5 years ago

Hey! Nice work on this :)

Trying to evaluate your bot on something I've been working on in the past year, and it looks like its dex is missing a few entries :\

Traceback (most recent call last):
  File "run.py", line 91, in <module>
    asyncio.get_event_loop().run_until_complete(showdown())
  File "/Users/Dan/miniconda2/envs/pmariglia-showdown/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "run.py", line 60, in showdown
    winner = await pokemon_battle(ps_websocket_client, is_random_battle)
  File "/Users/Dan/projects/pkmn/pmariglia-showdown/showdown/run_battle.py", line 168, in pokemon_battle
    action_required = await update_battle(battle, msg)
  File "/Users/Dan/projects/pkmn/pmariglia-showdown/showdown/state/battle_modifiers.py", line 336, in update_battle
    function_to_call(battle, split_msg)
  File "/Users/Dan/projects/pkmn/pmariglia-showdown/showdown/state/battle_modifiers.py", line 55, in switch_or_drag
    pkmn = Pokemon.from_switch_string(split_msg[3])
  File "/Users/Dan/projects/pkmn/pmariglia-showdown/showdown/state/pokemon.py", line 47, in from_switch_string
    return Pokemon(name, level)
  File "/Users/Dan/projects/pkmn/pmariglia-showdown/showdown/state/pokemon.py", line 18, in __init__
    self.base_stats = pokedex[self.name][constants.BASESTATS]
KeyError: 'pikachusinnoh'
pmariglia commented 5 years ago

Thanks for catching this! It seems I am a bit of of date with my data.

commit 7658d18 should fix this

yuzeh commented 5 years ago

Awesome!