1.1 问题1描述(TypeError: ‘NoneType’ object is not iterable)
当我们在pycharm或者其他IDE运行一段gym例子,程序结束时都会弹出这个错误提示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
OK Exception ignored in: <bound method Viewer.__del__ of <gym.envs.classic_control.rendering.Viewer object at 0x7f8758e0a4a8>> Traceback (most recent call last): File "/home/porter/gym/gym/envs/classic_control/rendering.py", line 152, in __del__ File "/home/porter/gym/gym/envs/classic_control/rendering.py", line 71, in close File "/home/porter/anaconda3/lib/python3.5/site-packages/pyglet/window/xlib/__init__.py", line 480, in close File "/home/porter/anaconda3/lib/python3.5/site-packages/pyglet/gl/xlib.py", line 345, in destroy File "/home/porter/anaconda3/lib/python3.5/site-packages/pyglet/gl/base.py", line 334, in destroy File "/home/porter/anaconda3/lib/python3.5/site-packages/pyglet/gl/xlib.py", line 335, in detach File "/home/porter/anaconda3/lib/python3.5/site-packages/pyglet/gl/lib.py", line 97, in errcheck File "<frozen importlib._bootstrap>", line 968, in _find_and_load File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 887, in _find_spec TypeError: 'NoneType' object is not iterable
while processing /home/harish/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot_simulator/turtlebot_gazebo/launch/includes/kobuki.launch.xml: Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/lib/xacro/xacro --inorder '/home/harish/gym-gazebo/gym_gazebo/envs/installation/catkin_ws/src/turtlebot/turtlebot_description/robots/kobuki_hexagons_asus_xtion_pro.urdf.xacro'] returned with code [2]. Param xml is The traceback for the exception was written to the log file
Traceback (most recent call last): File "/home/porter/gym-gazebo/examples/turtlebot/circuit_turtlebot_lidar_qlearn.py", line 24, in <module> env = gym.make('GazeboCircuitTurtlebotLidar-v0') File "/home/porter/gym/gym/envs/registration.py", line 155, in make return registry.make(id, **kwargs) File "/home/porter/gym/gym/envs/registration.py", line 100, in make env = spec.make(**kwargs) File "/home/porter/gym/gym/envs/registration.py", line 72, in make env = cls(**_kwargs) File "/home/porter/gym-gazebo/gym_gazebo/envs/turtlebot/gazebo_circuit_turtlebot_lidar.py", line 20, in __init__ gazebo_env.GazeboEnv.__init__(self, "GazeboCircuitTurtlebotLidar_v0.launch") File "/home/porter/gym-gazebo/gym_gazebo/envs/gazebo_env.py", line 36, in __init__ ros_path = os.path.dirname(subprocess.check_output(["which", "roscore"])) File "/home/porter/anaconda3/lib/python3.5/subprocess.py", line 316, in check_output **kwargs).stdout File "/home/porter/anaconda3/lib/python3.5/subprocess.py", line 398, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['which', 'roscore']' returned non-zero exit status 1
Multiple packages found with the same name "ecl_mobile_robot": - ecl_core/ecl_mobile_robot - ecl_navigation/ecl_mobile_robot setup_kinetic.bash: 行 80: devel/setup.bash: 没有那个文件或目录