Closed attraylor closed 3 years ago
Hey Aaron,
Thanks for reporting this. I'll get a fix tonight.
This should be fixed by #141. I will release it in version 0.4.11
when #139 is merged too - in the meantime, you can pull for master or rebase your fork from it :)
It is still happening, although not as the crash @attraylor mentioned. Instead, when it reaches turn 1000, it activates an "Endless Battle Clause":
Traceback (most recent call last):
File "env/lib/python3.6/site-packages/poke_env/player/player_network_interface.py", line 131, in _handle_message
await self._handle_battle_message(split_messages)
File "env/lib/python3.6/site-packages/poke_env/player/player.py", line 300, in _handle_battle_message
battle._parse_message(split_message)
File "env/lib/python3.6/site-packages/poke_env/environment/abstract_battle.py", line 454, in _parse_message
raise NotImplementedError(split_message)
NotImplementedError: ['', 'message', 'It is turn 1000. Endless Battle Clause activated!']
I am using version 0.4.11
.
Hi @Icemole,
Thanks for reporting this. Pokemon-showdown recently changed some of it's API / protocol structure: I suspect that is what is causing this issue. I'll take a look at it and try to fix it asap :)
Hey @Icemole,
I was unable to reproduce it with 1500+ turn battles. Which version of poke-env
are you using? If installed through pip
, you can pip freeze
to display your installed packages along with their versions.
Hi, pip freeze
shows poke-env==0.4.11
. I think I should mention that me and my colleague are developing a 1st generation bot so that may be our issue; the error may have been solved in posterior generations. We are using such version because it is the one that solves the warning on 500 turns (it seems it was relatively easy to run into a Clefairy - Gengar matchup for instance), but the latest version doesn't allow us to use a player from the 1st generation because of a KeyError
when accessing internal poke-env
data (we know it's not officially supported, but we still wanted to train an agent for the 1st gen).
Interesting - I'll try to get things running with gen 1 then :)
@Icemole poke-env
version 0.4.15 is out. It should let you run gen 1 / 2 / 3 battles (but log a warning) without too much trouble, using gen 4 objects (eg. Gen4Move
, Gen4Battle
, etc).
Regarding the Endless Battle Clause: message
type messages should be logged (info level logging). As an aside, Battle.turn
should let you deal with long-running battles as you see fit in your agents.
Please feel free to open an issue if you encounter any problem :) Gen 1 support is very basic right now, but if you have a specific need we can discuss it.
2021-04-13 08:39:38,118 - SimpleRLPlayer - ERROR - Unhandled exception raised while handling message: