You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "..../cleanrl/cleanrl/ppo.py", line 209, in <module>
next_obs, reward, terminations, truncations, infos = envs.step(action.cpu().numpy())
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/gymnasium/vector/vector_env.py", line 203, in step
return self.step_wait()
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/gymnasium/vector/sync_vector_env.py", line 149, in step_wait
) = env.step(action)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/gymnasium/wrappers/record_episode_statistics.py", line 89, in step
) = self.env.step(action)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/gymnasium/wrappers/record_video.py", line 180, in step
self.close_video_recorder()
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/gymnasium/wrappers/record_video.py", line 193, in close_video_recorder
self.video_recorder.close()
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/gymnasium/wrappers/monitoring/video_recorder.py", line 161, in close
clip.write_videofile(self.path, logger=moviepy_logger)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/moviepy/decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/moviepy/decorators.py", line 135, in use_clip_fps_by_default
return f(clip, *new_a, **new_kw)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB
return f(clip, *a, **k)
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/moviepy/video/VideoClip.py", line 300, in write_videofile
ffmpeg_write_video(self, filename, fps, codec,
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_writer.py", line 213, in ffmpeg_write_video
with FFMPEG_VideoWriter(filename, clip.size, fps, codec = codec,
File "/opt/homebrew/Caskroom/miniforge/base/envs/rl/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_writer.py", line 88, in __init__
'-r', '%.02f' % fps,
TypeError: must be real number, not NoneType
I'm on MacOS (M1 Mac) and installed FFMPEG via brew.
Video rendering crashes with TypeError: must be real number, not NoneType when using --capture_video. See traceback above.
Expected Behavior
Video rendering works without crashing and renders the video.
Possible Solution
Apparently, fps defaults to None and crashes. Since the callstack is quite deep, I'm not sure where fps could be set. I did not find an argument in CleanRL - ideally, it should default to a sensible value without setting it manually.
Problem Description
I'm trying to render a video as described in the docs, by running
Unfortunately, it crashes with
I'm on MacOS (M1 Mac) and installed FFMPEG via
brew
.Checklist
poetry install
(see CleanRL's installation guideline.Current Behavior
Video rendering crashes with
TypeError: must be real number, not NoneType
when using--capture_video
. See traceback above.Expected Behavior
Video rendering works without crashing and renders the video.
Possible Solution
Apparently,
fps
defaults to None and crashes. Since the callstack is quite deep, I'm not sure wherefps
could be set. I did not find an argument in CleanRL - ideally, it should default to a sensible value without setting it manually.At least in gym, there was a default of fps 30: https://github.com/openai/gym/blob/0.26.2/gym/wrappers/monitoring/video_recorder.py#L91
Not sure about gymnasium.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: