Closed yusufRahmatullah closed 8 years ago
In event_manager.py
change line 49 to for listener in list(self.listeners[priority]):
and let me know if problem persists.
I think an alternative fix would be changing line 49 to for listener in self.listeners[priority].copy()
:
Expected Behavior
[2016-08-01 10:24:03] [x] PokemonGO Bot v1.0 [2016-08-01 10:24:03] [x] Configuration initialized [2016-08-01 10:24:03] [Plugins] Loaded plugin "spin_pokestop". [2016-08-01 10:24:03] [Plugins] Loaded plugin "recycle_items". [2016-08-01 10:24:03] [Plugins] Loaded plugin "web". [2016-08-01 10:24:03] [Plugins] Loaded plugin "catch_pokemon". [2016-08-01 10:24:03] [Plugins] Loaded plugin "transfer_pokemon". [2016-08-01 10:24:03] [Plugins] Plugins loaded: ['catch_pokemon', 'recycle_items', 'spin_pokestop', 'transfer_pokemon', 'web'] [2016-08-01 10:24:03] [Events] Events available: ['item_bag_full', 'logging', 'pokemon_bag_full', 'pokemon_found', 'pokestop_arrived', 'pokestop_found', 'transfer_pokemon'] [2016-08-01 10:24:03] [x] Fetching altitude from google ...
Actual Behavior
Traceback (most recent call last): File "pokecli.py", line 293, in
main()
File "pokecli.py", line 281, in main
bot.start()
File "D:\games\OpenPoGoBot\pokemongo_botinit.py", line 66, in start
self._setup_api()
File "D:\games\OpenPoGoBot\pokemongo_botinit.py", line 140, in _setup_api
self._set_starting_position()
File "D:\games\OpenPoGoBot\pokemongo_botinit.py", line 254, in _set_starting_position
self._read_config_location()
File "D:\games\OpenPoGoBot\pokemongo_botinit.py", line 260, in _read_config_location
self.position = self._get_pos_by_name(self.config.location)
File "D:\games\OpenPoGoBot\pokemongo_botinit.py", line 269, in _get_pos_by_name
logger.log("[x] Fetching altitude from google")
File "D:\games\OpenPoGoBot\pokemongo_bot\logger.py", line 26, in log
manager.fire("logging", text=string, color=color, prefix=prefix)
File "D:\games\OpenPoGoBot\pokemongo_bot\event_manager.py", line 101, in fire
return self.events[event_name].fire(_args, *_kwargs)
File "D:\games\OpenPoGoBot\pokemongo_bot\event_manager.py", line 49, in fire
for listener in self.listeners[priority]:
RuntimeError: Set changed size during iteration
Steps to Reproduce
I Don't know how to reproduce this bug .. Sometimes it's error but sometimes not
Other Information
OS: Windows 8.1 Git Commit: e1bd866e7297663bb236efd719a4122543a4adc5