qgallouedec / panda-gym

Set of robotic environments based on PyBullet physics engine and gymnasium.
MIT License
492 stars 106 forks source link

panda-gym v2 error; "TypeError: catching classes that do not inherit from BaseException is not allowed". #86

Closed ppangTae closed 1 month ago

ppangTae commented 4 months ago

Describe the bug

The docs said that panda-gym v3 is not compatible with SB3, so I tried to use v2. So I installed it with "pip install panda-gym==2.0.4" and ran the code as shown in the docs and got the following error "TypeError: catching classes that do not inherit from BaseException is not allowed".

To Reproduce

Provide a minimal code :

The code below is what I ran.

import gym import panda_gym from stable_baselines3 import DDPG

env = gym.make("PandaReach-v2") model = DDPG(policy="MultiInputPolicy", env=env) model.learn(30_000)

System

ChiaChing-Yen commented 1 month ago

Try adding env.close() at the end of the script?

see #80

qgallouedec commented 1 month ago

I'd recommend using v3 and gymnasium Yes the error originates from pybullet when you don't close the env (as far as I remember) which shouldn't be an issue if you close the close) If the error persists with v3, please open a new issue