garymcintire / mpi_util

25 stars 2 forks source link

CalledProcessError: Command '['avconv', '-version']' returned non-zero exit status 1 #2

Open FishQian opened 6 years ago

FishQian commented 6 years ago

Hi all,

I am excited about the repo but met this error after running the train.py. Any idea or thoughts on that will be appreciated. I'm running in 3.16.0-4-amd64, and python 3.5.2 Thanks,

[2017-09-29 14:28:00,861] Starting new video recorder writing to /tmp/Walker2d-v1/Sep-29_21:27:59/openaigym.video.1.29235.video000000.mp4 Traceback (most recent call last):

File "", line 1, in runfile('/netapp/cnl/home/kqian/anaconda3/envs/mujoco_new/trpo/src/train.py', wdir='/netapp/cnl/home/kqian/anaconda3/envs/mujoco_new/trpo/src')

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile execfile(filename, namespace)

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "/netapp/cnl/home/kqian/anaconda3/envs/mujoco_new/trpo/src/train.py", line 330, in main(**vars(args))

File "/netapp/cnl/home/kqian/anaconda3/envs/mujoco_new/trpo/src/train.py", line 290, in main run_policy(env, policy, scaler, logger, episodes=5)

File "/netapp/cnl/home/kqian/anaconda3/envs/mujoco_new/trpo/src/train.py", line 137, in run_policy observes, actions, rewards, unscaled_obs = run_episode(env, policy, scaler)

File "/netapp/cnl/home/kqian/anaconda3/envs/mujoco_new/trpo/src/train.py", line 90, in run_episode obs = env.reset()

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/gym/core.py", line 104, in reset return self._reset()

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/gym/wrappers/monitoring.py", line 41, in _reset self._after_reset(observation)

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/gym/wrappers/monitoring.py", line 198, in _after_reset self._reset_video_recorder()

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/gym/wrappers/monitoring.py", line 219, in _reset_video_recorder self.video_recorder.capture_frame()

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/gym/monitoring/video_recorder.py", line 121, in capture_frame self._encode_image_frame(frame)

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/gym/monitoring/video_recorder.py", line 168, in _encode_image_frame self.metadata['encoder_version'] = self.encoder.version_info

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/site-packages/gym/monitoring/video_recorder.py", line 268, in version_info stderr=subprocess.STDOUT)),

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/subprocess.py", line 626, in check_output **kwargs).stdout

File "/home/kqian/anaconda3/envs/mujoco_new/lib/python3.5/subprocess.py", line 708, in run output=stdout, stderr=stderr)

CalledProcessError: Command '['avconv', '-version']' returned non-zero exit status 1

garymcintire commented 6 years ago

fishchain,

Bummer! I don't know what is going on but...

try commenting out the line that wraps the monitor around the env. It should run without graphics.

Have you used mujoco walker2d in other programs?

Are you on a remote system where you would need to install vglrun in order to do remote graphics?

FishQian commented 6 years ago

@garymcintire Thank you for your response. I'm actually running in a working station and have no problem with displaying videos of Walker2d.

Also, I found out that the default animate is False (in the train.py, line 75, defined in the run_episode(env, policy, scaler, animate=False)) so I was wondering which function is responsible for opening the simulation window.

Look forward to more advice, thanks

pat-coady commented 6 years ago

@fishchian - Is avconv (libav) installed on your system?

Also, let's just track this problem in one repo. I'll close other issue.

garymcintire commented 6 years ago

@fishchian Try commenting out the monitor wrapper statement to see if it works. But it appears you do not have avconv installed correctly. This is what I get when I type avconv -version

(python3.5) gary@gary-ubuntuNN:~/mypython/curiosity/test4$ avconv -version ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609 configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100