janwithb / carla-gym-wrapper

A simple gym environment wrapping Carla, a simulator for autonomous driving research. The environment is designed for developing and comparing reinforcement learning algorithms. Trackable costs also enable the application of safe reinforcement learning algorithms.
Apache License 2.0
34 stars 6 forks source link

not enough values to unpack (expected 5, got 4) #6

Open SExpert12 opened 2 weeks ago

SExpert12 commented 2 weeks ago

Hi, I run this file.

python3 carla_env_test.py

and I got this error:

logger.warn(f"{pre} is not within the observation space.") Traceback (most recent call last): File "carla_env_test.py", line 9, in next_obs, reward, done, done,info = env.step([1, 0]) File "/home/ryzen/carla-gym-wrapper-main/gymagent/lib/python3.8/site-packages/gym/wrappers/time_limit.py", line 52, in step observation, reward, terminated, truncated, info = self.env.step(action) ValueError: not enough values to unpack (expected 5, got 4)

When I trace it is actually 4 values but I don't know how to modify code. How to resolve this?

janwithb commented 1 week ago

Hi @SExpert12 Instead of: next_obs, reward, done, done,info = env.step([1, 0]) could you try the following: next_obs, reward, done, info = env.step([1, 0])

SExpert12 commented 1 week ago

Sure. Thanks for your reply.