Open petport opened 4 years ago
I also have this problem.
Same problem happened in:
@pedagil I cloned the current master of mujoco-py, changed all isinstance(addr, (int, np.int32, np.int64))
|-> hasattr(addr, '__int__')
in mujoco-py\mujoco_py\generated\wrappers.pxi
as discussed at TypeError:'numpy.int32' object is not iterable.
Finally, I used pip install -e .
in the cloned mujoco-py mater repo, and successfully created the hand related repo, e.g.env = gym.make('HandManipulatePenTouchSensorsDense-v0')
I have the same problem, on Windows 10. Seems that the solutions for TypeError:'numpy.int32' object is not iterable. can not work for this issue.
@pedagil I cloned the current master of mujoco-py, changed all
isinstance(addr, (int, np.int32, np.int64))
|->hasattr(addr, '__int__')
inmujoco-py\mujoco_py\generated\wrappers.pxi
as discussed at TypeError:'numpy.int32' object is not iterable. Finally, I usedpip install -e .
in the cloned mujoco-py mater repo, and successfully created the hand related repo, e.g.env = gym.make('HandManipulatePenTouchSensorsDense-v0')
Worked for me for FetchReach-v1 environment. Thanks a lot.
@pedagil I cloned the current master of mujoco-py, changed all
isinstance(addr, (int, np.int32, np.int64))
|->hasattr(addr, '__int__')
inmujoco-py\mujoco_py\generated\wrappers.pxi
as discussed at TypeError:'numpy.int32' object is not iterable. Finally, I usedpip install -e .
in the cloned mujoco-py mater repo, and successfully created the hand related repo, e.g.env = gym.make('HandManipulatePenTouchSensorsDense-v0')
Where is your setup.py of mujoco-py ? How to pip install -e .
@pedagil I cloned the current master of mujoco-py, changed all
isinstance(addr, (int, np.int32, np.int64))
|->hasattr(addr, '__int__')
inmujoco-py\mujoco_py\generated\wrappers.pxi
as discussed at TypeError:'numpy.int32' object is not iterable. Finally, I usedpip install -e .
in the cloned mujoco-py mater repo, and successfully created the hand related repo, e.g.env = gym.make('HandManipulatePenTouchSensorsDense-v0')
Where is your setup.py of mujoco-py ? How to pip install -e .
Oh,I've got it!
@pedagil I cloned the current master of mujoco-py, changed all
isinstance(addr, (int, np.int32, np.int64))
|->hasattr(addr, '__int__')
inmujoco-py\mujoco_py\generated\wrappers.pxi
as discussed at TypeError:'numpy.int32' object is not iterable. Finally, I usedpip install -e .
in the cloned mujoco-py mater repo, and successfully created the hand related repo, e.g.env = gym.make('HandManipulatePenTouchSensorsDense-v0')
I have no words. Not all heroes wear capes. Thank you.
I edited the wrappers.pxi file as mentioned and reinstalled mujoco-py. I am still facing the same issue. Please suggest.
Describe the bug I'm able to use env that requires mujoco such as 'CartPole-v1', but can't render any of Fetch robotic env. This is likely something like
TypeError:'numpy.int32' object is not iterable
for make('FetchReach-v1') #324 . Fix fix advanced mujoco envs for windows path separation #1220 Does not work for meTo Reproduce import gym # openAi gym from gym import envs
env = gym.make('FetchSlide-v1') env.reset() for _ in range(1000): env.render() env.step(env.action_space.sample()) # take a random action env.close()
Error Messages Traceback (most recent call last): File "C:/Users/petrosp/PycharmProjects/FetchReach/FetchReach.py", line 4, in
env = gym.make('FetchSlide-v1')
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\registration.py", line 156, in make return registry.make(id, **kwargs)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\registration.py", line 101, in make env = spec.make(**kwargs)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\registration.py", line 73, in make env = cls(**_kwargs)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\fetch\slide.py", line 24, in init initial_qpos=initial_qpos, reward_type=reward_type)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\fetch_env.py", line 48, in init initial_qpos=initial_qpos)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\robot_env.py", line 36, in init self._env_setup(initial_qpos=initial_qpos)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\fetch_env.py", line 172, in _env_setup self.sim.data.set_joint_qpos(name, value)
File "mujoco_py\generated/wrappers.pxi", line 2547, in mujoco_py.cymj.PyMjData.set_joint_qpos TypeError: 'numpy.intc' object is not iterable
Desktop (please complete the following information):
- OS: Windows 10
- Python Version 3.7.5
- Mujoco Version [e.g. 1.50]
- mujoco-py version [e.g. 1.50.1.68]
Can not solve the problem even with mujoco 150, 200 or 210. If there exist any new solution ......
Describe the bug I'm able to use env that requires mujoco such as 'CartPole-v1', but can't render any of Fetch robotic env. This is likely something like
TypeError:'numpy.int32' object is not iterable
for make('FetchReach-v1') #324 . Fix fix advanced mujoco envs for windows path separation #1220 Does not work for meTo Reproduce import gym # openAi gym from gym import envs
env = gym.make('FetchSlide-v1') env.reset() for _ in range(1000): env.render() env.step(env.action_space.sample()) # take a random action env.close()
Error Messages Traceback (most recent call last): File "C:/Users/petrosp/PycharmProjects/FetchReach/FetchReach.py", line 4, in
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\registration.py", line 156, in make return registry.make(id, **kwargs)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\registration.py", line 101, in make env = spec.make(**kwargs)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\registration.py", line 73, in make env = cls(**_kwargs)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\fetch\slide.py", line 24, in init initial_qpos=initial_qpos, reward_type=reward_type)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\fetch_env.py", line 48, in init initial_qpos=initial_qpos)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\robot_env.py", line 36, in init self._env_setup(initial_qpos=initial_qpos)
File "C:\Users\petrosp\Anaconda3\envs\MainEnv\lib\site-packages\gym\envs\robotics\fetch_env.py", line 172, in _env_setup self.sim.data.set_joint_qpos(name, value)
File "mujoco_py\generated/wrappers.pxi", line 2547, in mujoco_py.cymj.PyMjData.set_joint_qpos TypeError: 'numpy.intc' object is not iterable
Desktop (please complete the following information):