Closed jhih-ching-yeh closed 2 years ago
I had the same error with my custom Pettingzoo env. Try sys.modules["gym"] = gymnasium
! in my case, it is solved!
Thank you @KevinJeon for providing a solution! I'm sorry for the state of the dependencies now, but many changes have been happening in gym (now gymnasium) and PettingZoo and libraries such as stable-baselines and rllib have not been updated yet. Hence, the examples in sumo-rl are currently not working properly, but should be updated as soon as the libraries are updated to the newer versions of gymnasium and PettingZoo.
@KevinJeon Hi Kevin, could you tell me where should I put this sys.modules["gym"] = gymnasium ? I have the latest files from the repo (per today, 04.05.2023) I'm still new in the field and facing the same issue. Thanks!
in my case, I just that code in my custom main.py file!
When I executed dqn example, I ran into this problem.
AssertionError: The algorithm only supports (<class 'gym.spaces.discrete.Discrete'>,) as action spaces but Discrete(4) was provided
Is this the same problem as you mentioned about the gym version? Or is it caused by other reasons?I hope you can mention the solution. Thanks a lot!