From 20ee644acb03c462ea2f8e881b8ed5527bb70a8e Mon Sep 17 00:00:00 2001 From: Tucker Date: Wed, 27 Jul 2022 16:50:17 +0000 Subject: [PATCH] fixed import errors. --- smarts/env/wrappers/gif_recorder.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/smarts/env/wrappers/gif_recorder.py b/smarts/env/wrappers/gif_recorder.py index c7b9ca9486..fc5224e10d 100644 --- a/smarts/env/wrappers/gif_recorder.py +++ b/smarts/env/wrappers/gif_recorder.py @@ -21,15 +21,15 @@ # THE SOFTWARE. import os import sys -import subprocess try: from moviepy.editor import ImageClip from moviepy.editor import ImageSequenceClip -except: - subprocess.check_call([sys.executable, "-m", "pip", "install", "moviepy"]) - from moviepy.editor import ImageClip - from moviepy.editor import ImageSequenceClip +except (ImportError, ModuleNotFoundError): + print(sys.exc_info()) + print( + "You may not have installed the [gym] dependencies required to capture the video. Install them first using the command `pip install -e .[gym]` at the source directory." + ) import shutil import time from pathlib import Path