diff --git a/gymnasium/experimental/wrappers/common.py b/gymnasium/experimental/wrappers/common.py index 2eb40ca02..886f5fb17 100644 --- a/gymnasium/experimental/wrappers/common.py +++ b/gymnasium/experimental/wrappers/common.py @@ -83,11 +83,11 @@ class PassiveEnvCheckerV0( assert hasattr( env, "action_space" - ), "The environment must specify an action space. https://gymnasium.farama.org/content/environment_creation/" + ), "The environment must specify an action space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/" check_action_space(env.action_space) assert hasattr( env, "observation_space" - ), "The environment must specify an observation space. https://gymnasium.farama.org/content/environment_creation/" + ), "The environment must specify an observation space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/" check_observation_space(env.observation_space) self._checked_reset: bool = False diff --git a/gymnasium/utils/env_checker.py b/gymnasium/utils/env_checker.py index e32e22127..53aa67766 100644 --- a/gymnasium/utils/env_checker.py +++ b/gymnasium/utils/env_checker.py @@ -262,7 +262,7 @@ def check_env(env: gym.Env, warn: bool = None, skip_render_check: bool = False): This is an invasive function that calls the environment's reset and step. This is particularly useful when using a custom environment. - Please take a look at https://gymnasium.farama.org/content/environment_creation/ + Please take a look at https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more information about the API. Args: @@ -275,7 +275,7 @@ def check_env(env: gym.Env, warn: bool = None, skip_render_check: bool = False): assert isinstance( env, gym.Env - ), "The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/content/environment_creation/ for more info." + ), "The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info." if env.unwrapped is not env: logger.warn( @@ -285,13 +285,13 @@ def check_env(env: gym.Env, warn: bool = None, skip_render_check: bool = False): # ============= Check the spaces (observation and action) ================ assert hasattr( env, "action_space" - ), "The environment must specify an action space. See https://gymnasium.farama.org/content/environment_creation/ for more info." + ), "The environment must specify an action space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info." check_action_space(env.action_space) check_space_limit(env.action_space, "action") assert hasattr( env, "observation_space" - ), "The environment must specify an observation space. See https://gymnasium.farama.org/content/environment_creation/ for more info." + ), "The environment must specify an observation space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info." check_observation_space(env.observation_space) check_space_limit(env.observation_space, "observation") diff --git a/gymnasium/wrappers/env_checker.py b/gymnasium/wrappers/env_checker.py index ae86724ea..545f9074a 100644 --- a/gymnasium/wrappers/env_checker.py +++ b/gymnasium/wrappers/env_checker.py @@ -29,11 +29,11 @@ class PassiveEnvChecker(gym.Wrapper, gym.utils.RecordConstructorArgs): assert hasattr( env, "action_space" - ), "The environment must specify an action space. https://gymnasium.farama.org/content/environment_creation/" + ), "The environment must specify an action space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/" check_action_space(env.action_space) assert hasattr( env, "observation_space" - ), "The environment must specify an observation space. https://gymnasium.farama.org/content/environment_creation/" + ), "The environment must specify an observation space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/" check_observation_space(env.observation_space) self.checked_reset = False diff --git a/tests/utils/test_env_checker.py b/tests/utils/test_env_checker.py index 74809d1dd..d348dc0c8 100644 --- a/tests/utils/test_env_checker.py +++ b/tests/utils/test_env_checker.py @@ -244,15 +244,15 @@ def test_check_reset_options(): [ [ "Error", - "The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/content/environment_creation/ for more info.", + "The environment must inherit from the gymnasium.Env class. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info.", ], [ GenericTestEnv(action_space=None), - "The environment must specify an action space. See https://gymnasium.farama.org/content/environment_creation/ for more info.", + "The environment must specify an action space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info.", ], [ GenericTestEnv(observation_space=None), - "The environment must specify an observation space. See https://gymnasium.farama.org/content/environment_creation/ for more info.", + "The environment must specify an observation space. See https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/ for more info.", ], ], ) diff --git a/tests/wrappers/test_passive_env_checker.py b/tests/wrappers/test_passive_env_checker.py index f62c09d63..52e97f2aa 100644 --- a/tests/wrappers/test_passive_env_checker.py +++ b/tests/wrappers/test_passive_env_checker.py @@ -35,7 +35,7 @@ def test_passive_checker_wrapper_warnings(env): [ ( GenericTestEnv(action_space=None), - "The environment must specify an action space. https://gymnasium.farama.org/content/environment_creation/", + "The environment must specify an action space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/", ), ( GenericTestEnv(action_space="error"), @@ -43,7 +43,7 @@ def test_passive_checker_wrapper_warnings(env): ), ( GenericTestEnv(observation_space=None), - "The environment must specify an observation space. https://gymnasium.farama.org/content/environment_creation/", + "The environment must specify an observation space. https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/", ), ( GenericTestEnv(observation_space="error"),