From 3252f18098d73a9e5c1efc9530b7ea8f78bdec49 Mon Sep 17 00:00:00 2001 From: Bjarne-55 <73470930+Bjarne-55@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:40:01 +0200 Subject: [PATCH] Add assert to prevent None Environment --- mushroom_rl/core/multiprocess_environment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mushroom_rl/core/multiprocess_environment.py b/mushroom_rl/core/multiprocess_environment.py index ce7633a9..6f566851 100644 --- a/mushroom_rl/core/multiprocess_environment.py +++ b/mushroom_rl/core/multiprocess_environment.py @@ -66,6 +66,7 @@ def __init__(self, env_class, *args, n_envs=-1, use_generator=False, **kwargs): **kwargs: keyword arguments to set to the constructor or to the generator; """ + assert env_class is not None, "Environment class requires not installed module." assert n_envs > 1 or n_envs == -1 if n_envs == -1: