ligerfotis/M2CURL

TypeError: 'NoneType' object cannot be interpreted as an integer

Opened this issue · 3 comments

yuxwen commented

Traceback (most recent call last): File "/home/dell/桌面/M2CURL-master/tactile_gym/sb3_helpers/train_agent.py", line 428, in train_agent( File "/home/dell/桌面/M2CURL-master/tactile_gym/sb3_helpers/train_agent.py", line 242, in train_agent final_evaluation( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactile_gym-0.0.1-py3.10.egg/tactile_gym/sb3_helpers/eval_agent_utils.py", line 100, in final_evaluation eval_env = make_eval_env( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactile_gym-0.0.1-py3.10.egg/tactile_gym/sb3_helpers/rl_utils.py", line 49, in make_eval_env eval_env = gym.make( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/envs/registration.py", line 235, in make return registry.make(id, **kwargs) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/envs/registration.py", line 129, in make env = spec.make(kwargs) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/envs/registration.py", line 90, in make env = cls(kwargs) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactilegym-0.0.1-py3.10.egg/tactile_gym/rl_envs/exploration/surface_follow/surface_follow_auto/surface_follow_auto_env.py", line 25, in init super(SurfaceFollowAutoEnv, self).init(max_steps, image_size, env_modes, show_gui, show_tactile) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactile_gym-0.0.1-py3.10.egg/tactile_gym/rl_envs/exploration/surface_follow/base_surface_env.py", line 83, in init self.setup_action_space() File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactile_gym-0.0.1-py3.10.egg/tactile_gym/rl_envs/exploration/surface_follow/base_surface_env.py", line 204, in setup_action_space self.action_space = gym.spaces.Box( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/spaces/box.py", line 54, in init low = np.full(shape, low, dtype=dtype) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/numpy/core/numeric.py", line 329, in full a = empty(shape, dtype, order) TypeError: 'NoneType' object cannot be interpreted as an integer

Hello, I'm a reinforcement learning novice. I found an error in testing your program, and I'm not sure if it has finished training because there are files generated when the training reaches 100%: save_models/surface_follow_v0/*********/trained_models/best_model_zip, evaluation.npz, final_models.zip, 0.monitor.csv, algo_params.json, learning_curves.png, rl_params.json.

pybullet build time: Apr 17 2024 10:03:01
argv[0]=
failed to EGL with glad.
pybullet build time: Apr 17 2024 10:03:01
argv[0]=
pybullet build time: Apr 17 2024 10:03:01
failed to EGL with glad.
argv[0]=
pybullet build time: Apr 17 2024 10:03:01
argv[0]=
failed to EGL with glad.
failed to EGL with glad.
pybullet build time: Apr 17 2024 10:03:01
argv[0]=
failed to EGL with glad.
pybullet build time: Apr 17 2024 10:03:01
argv[0]=
Traceback (most recent call last):
File "/home/esir/M2CURL/tactile_gym/sb3_helpers/train_agent.py", line 428, in
train_agent(
File "/home/esir/M2CURL/tactile_gym/sb3_helpers/train_agent.py", line 169, in train_agent
env = make_training_envs(env_name, rl_params, save_dir)
File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/site-packages/tactile_gym-0.0.1-py3.10.egg/tactile_gym/sb3_helpers/rl_utils.py", line 17, in make_training_envs
env = make_vec_env(
File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/site-packages/stable_baselines3/common/env_util.py", line 108, in make_vec_env
return vec_env_cls([make_env(i + start_index) for i in range(n_envs)], **vec_env_kwargs)
File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 112, in init
observation_space, action_space = self.remotes[0].recv()
File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes
buf = self._recv(4)
File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/multiprocessing/connection.py", line 379, in _recv
chunk = read(handle, remaining)
ConnectionResetError: [Errno 104] Connection reset by peer
I found an error in testing your program, and I'm not sure if it has finished training

Hi,

I also met this bug. Have you fixed it?