Open Lingxu-Z opened 1 year ago
@Lingxu-Z
on a very superficial read it might be a mismatch in gym
and stable_baselines3
versions?
I would try to use the latest stable_baselines3
2.0 and the version of gym-pybullet-drones
on branch main
(not the default master
)
git clone -b main https://github.com/utiasDSL/gym-pybullet-drones.git
Hello Jacob or anybody who can answer the question,
Thank you for your repository. I am a beginner on reinforcement learning and have a very basic problem if you could put some light on it.
I am trying to run learn.py in examples but getting following error. I am thinking it's because of the versions of gym or gymnasium, do anybody know how to fix it?
Sorry to bother U.
`D:\mini_conda\envs\gym-pybullet-drones-0-52\python.exe "F:\master degree period\second year\thesis\project\pybullet-drones\gym-pybullet-drones-0.5.2\examples\learn.py" Traceback (most recent call last): File "F:\master degree period\second year\thesis\project\pybullet-drones\gym-pybullet-drones-0.5.2\examples\learn.py", line 121, in
from stable_baselines3 import A2C
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\stable_baselines3__init.py", line 3, in
from stable_baselines3.a2c import A2C
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\stable_baselines3\a2c__init.py", line 1, in
from stable_baselines3.a2c.a2c import A2C
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\stable_baselines3\a2c\a2c.py", line 7, in
from stable_baselines3.common.on_policy_algorithm import OnPolicyAlgorithm
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\stable_baselines3\common\on_policy_algorithm.py", line 9, in
from stable_baselines3.common.base_class import BaseAlgorithm
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\stable_baselines3\common\base_class.py", line 18, in
from stable_baselines3.common.env_util import is_wrapped
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\stable_baselines3\common\env_util.py", line 6, in
from stable_baselines3.common.atari_wrappers import AtariWrapper
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\stable_baselines3\common\atari_wrappers.py", line 17, in
class StickyActionEnv(gym.Wrapper[np.ndarray, int, np.ndarray, int]):
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\typing.py", line 261, in inner
return func(*args, **kwds)
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\typing.py", line 897, in class_getitem
_check_generic(cls, params)
File "D:\mini_conda\envs\gym-pybullet-drones-0-52\lib\site-packages\typing_extensions.py", line 164, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} parameters for {cls};"
TypeError: Too many parameters for <class 'gymnasium.core.Wrapper'>; actual 4, expected 2`