Recording videos of custom gym environments

Hi, I am try to use VecVideoRecorder to log videos of my custom environment. The observation come from a camera, though I don’t think that is the issue. The error is:

AttributeError(“‘VideoRecorder’ object has no attribute ‘path’”)

I’m not directly setting nor accessing an attribute ‘path’ so I’m having identifying where this is coming from. My code looks like this:

def make_env():
    env = DummyVecEnv([lambda:    Monitor(ReacherFiveJointsImageSpace(random_start=wandb.config.random_start,
    env = VecNormalize(env, norm_obs=True, norm_reward=True, clip_obs=5.)
    env = VecVideoRecorder(env, video_folder=log_dir,
                           record_video_trigger=lambda x: x % 100 == 0, video_length=10)  # record videos
    stats_path = os.path.join(log_dir,
                              "run" + str( + "_vec_normalize_" + + ".pkl")
    return env

Can anyone point me in the right direction?


Hi @cbellinger , this doesn’t appear to be directly tied to W&B. Can you please revisit source code for the videorecorder to identify if your setup is correct. Thanks

Hi @cbellinger , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!