Farama-Foundation / SuperSuit

A collection of wrappers for Gymnasium and PettingZoo environments (being merged into gymnasium.wrappers and pettingzoo.wrappers
Other
452 stars 57 forks source link

Added more descriptive error message for StopIteration exception #125

Closed sathvikrav closed 2 years ago

sathvikrav commented 2 years ago

Added more descriptive error message for StopIteration exception in make_defaultdict.py file as per Farama-Foundation/PettingZoo#600

jkterry1 commented 2 years ago

Its for this issue: https://github.com/Farama-Foundation/PettingZoo/issues/600

benblack769 commented 2 years ago

I belive that this will only occur when there are no agents left in the environment. Given that, the two ways I see to resolve this are:

  1. An error message noting that there are no agents left in the environment, and
  2. Returning an empty dictionary (this should be fine? Not 100% sure)
benblack769 commented 2 years ago

Closed in favor of #129