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

Error with AEC env on standard multi-agent atari wrappers #104

Closed benblack769 closed 3 years ago

benblack769 commented 3 years ago
  env = importlib.import_module('pettingzoo.atari.{}'.format(env_name)).env(obs_type='grayscale_image')
  env = max_observation_v0(env, 2)
  env = frame_skip_v0(env, 4)
  # env = InvertColorAgentIndicator(env) # handled by body
  env = resize_v0(env, 84, 84)
  env = reshape_v0(env, (1, 84, 84))
  env = to_parallel(env)
...

Gives error:

    return super().observe(agent)
  File "/home/ben/.virtualenvs/main_env/lib/python3.6/site-packages/pettingzoo/utils/wrappers/base.py", line 62, in observe
    return self.env.observe(agent)                                                                                                                                                                                   File "/home/ben/.virtualenvs/main_env/lib/python3.6/site-packages/supersuit/generic_wrappers/frame_skip.py", line 60, in observe                                                                                     return fin_observe if fin_observe is not None else super().observe(agent)
  File "/home/ben/.virtualenvs/main_env/lib/python3.6/site-packages/pettingzoo/utils/wrappers/base.py", line 62, in observe                                                                                            return self.env.observe(agent)
  File "/home/ben/.virtualenvs/main_env/lib/python3.6/site-packages/supersuit/generic_wrappers/utils/shared_wrapper_util.py", line 41, in observe
    return self.modifiers[agent].get_last_obs()
  File "/home/ben/.virtualenvs/main_env/lib/python3.6/site-packages/supersuit/generic_wrappers/utils/base_modifier.py", line 17, in get_last_obs
    return self.cur_obs
AttributeError: 'MaxObsModifier' object has no attribute 'cur_obs'
benblack769 commented 3 years ago

Doesn't seem to be a problem with the next release