Ask Your Question
0

runtime erro ( openai_examples_projects )

asked 2019-02-16 06:14:09 -0500

hyunoklee gravatar image

I use Unbuntu 16.04 , kinetic . I use https://bitbucket.org/theconstructcor... But I have runtime erro.

If I run below command roslaunch my_turtlebot3_openai_example start_training.launch

I can see below runtime erro. please help me. thank you

hyunoklee@ubuntu:~/catkin_ws$ roslaunch my_turtlebot3_openai_example start_training.launch

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
process[turtlebot3_world-1]: started with pid [22615]
Traceback (most recent call last):
File "/home/hyunoklee/catkin_ws/src/openai_examples_projects/my_turtlebot3_openai_example/scripts/start_qlearning.py", line 20, in <module>
env = gym.make('TurtleBot3World-v0')
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 171, in make
return registry.make(id, kwargs)
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 123, in make
env = spec.make(
kwargs)
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 87, in make
env = cls(**_kwargs)
File "/home/hyunoklee/catkin_ws/src/openai_ros/openai_ros/src/openai_ros/task_envs/turtlebot3/turtlebot3_world.py", line 27, in __init__
self.action_space = spaces.Discrete(number_actions)
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/spaces/discrete.py", line 15, in __init__
super().__init__((), np.int64)
TypeError: super() takes at least 1 argument (0 given)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-02-16 09:21:07 -0500

hyunoklee gravatar image

I solve this. If I install gym by " pip install gym " . the gym code is for python3 .

First Solution is to install gym by code level .
git clone https://github.com/openai/gym.git cd gym pip install -e .

Sencond Solution is the change code like below.
~/.local/lib/python2.7/site-packages/gym/spaces/discrete.py #super().__init__((), np.int64) -> super(Discrete,self).__init__((), np.int64)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-02-16 06:14:09 -0500

Seen: 90 times

Last updated: Feb 16