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
While trying to run examples/agents/random_agent.py from 7b91967 with Python 3.5.1, I get:
Traceback (most recent call last):
File "examples/agents/random_agent.py", line 36, in <module>
ob = env.reset()
File "/home/pierre-luc/anaconda3/lib/python3.5/site-packages/gym-0.0.7-py3.5.egg/gym/core.py", line 96, in reset
self.monitor._after_reset(observation)
File "/home/pierre-luc/anaconda3/lib/python3.5/site-packages/gym-0.0.7-py3.5.egg/gym/monitoring/monitor.py", line 228, in _after_reset
self._close_video_recorder()
File "/home/pierre-luc/anaconda3/lib/python3.5/site-packages/gym-0.0.7-py3.5.egg/gym/monitoring/monitor.py", line 243, in _close_video_recorder
self.video_recorder.close()
File "/home/pierre-luc/anaconda3/lib/python3.5/site-packages/gym-0.0.7-py3.5.egg/gym/monitoring/video_recorder.py", line 144, in close
self.write_metadata()
File "/home/pierre-luc/anaconda3/lib/python3.5/site-packages/gym-0.0.7-py3.5.egg/gym/monitoring/video_recorder.py", line 150, in write_metadata
json.dump(self.metadata, f)
File "/home/pierre-luc/anaconda3/lib/python3.5/json/__init__.py", line 178, in dump
for chunk in iterable:
File "/home/pierre-luc/anaconda3/lib/python3.5/json/encoder.py", line 429, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/home/pierre-luc/anaconda3/lib/python3.5/json/encoder.py", line 403, in _iterencode_dict
yield from chunks
File "/home/pierre-luc/anaconda3/lib/python3.5/json/encoder.py", line 403, in _iterencode_dict
yield from chunks
File "/home/pierre-luc/anaconda3/lib/python3.5/json/encoder.py", line 436, in _iterencode
o = _default(o)
File "/home/pierre-luc/anaconda3/lib/python3.5/json/encoder.py", line 180, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: b'avconv 9.18-6:9.18-0ubuntu0.14.04.1\nlibavutil 52. 3. 0 / 52. 3. 0\nlibavcodec 54. 35. 0 / 54. 35. 0\nlibavformat 54. 20. 4 / 54. 20. 4\nlibavdevice 53. 2. 0 / 53. 2. 0\nlibavfi
lter 3. 3. 0 / 3. 3. 0\nlibavresample 1. 0. 1 / 1. 0. 1\nlibswscale 2. 1. 1 / 2. 1. 1\n' is not JSON serializable
While trying to run
examples/agents/random_agent.py
from 7b91967 with Python 3.5.1, I get:The error is due to the fact that subprocess.check_output on line 257 of gym/monitoring/video_recording.py returns a bytes string but json.dump expects a
str
type.I fixed the problem on my system with
str()
on the output ofcheck_output
:There is a probably a better way to fix this problem portably using six.
The text was updated successfully, but these errors were encountered: