Skip to content

Commit

Permalink
Merge pull request #277 from huangshiyu13/main
Browse files Browse the repository at this point in the history
- fix bugs: AttributeError: module 'openrl.envs' has no attribute 'Pe…
  • Loading branch information
huangshiyu13 authored Dec 5, 2023
2 parents e8c6ee9 + 9a05e6f commit 5d21f65
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions openrl/envs/common/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import gymnasium as gym

import openrl
from openrl.envs.PettingZoo.registration import pettingzoo_env_dict
from openrl.envs.vec_env import (
AsyncVectorEnv,
BaseVecEnv,
Expand Down Expand Up @@ -148,10 +149,7 @@ def make(
render_mode=convert_render_mode,
**kwargs,
)
elif (
id in openrl.envs.pettingzoo_all_envs
or id in openrl.envs.PettingZoo.registration.pettingzoo_env_dict.keys()
):
elif id in openrl.envs.pettingzoo_all_envs or id in pettingzoo_env_dict.keys():
from openrl.envs.PettingZoo import make_PettingZoo_envs

env_fns = make_PettingZoo_envs(
Expand Down

0 comments on commit 5d21f65

Please sign in to comment.