Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: step_async() takes 2 positional arguments but 3 were given #2

Open
taylorlulu opened this issue Feb 26, 2024 · 4 comments
Open

Comments

@taylorlulu
Copy link

I encountered the error:

TypeError: step_async() takes 2 positional arguments but 3 were given

When I'm trying to run the training.py code. After debugging, I found that the problem was caused by

if indices is None:
self.step_async(actions)
return self.step_wait()
else:
self.step_async(actions,indices)
return self.step_wait(indices)
while the step_async function was referenced to the
https://github.com/DLR-RM/stable-baselines3/blob/21f6a474a4755996709efee8c0aab309df905cbf/stable_baselines3/common/vec_env/base_vec_env.py#L263-L264 which only takes two arguments. Is it a problem caused by the version of stable_baselines3?

@tangliangcjy
Copy link

do you have solved this problem?

@dHonerkamp
Copy link
Collaborator

Hi, sorry for not seeing the issue before. What version of stable baselines are you using? Can you try it with the version used by this repository, which should be stable-baselines3==1.4.0? Or with the provided docker image directly?

@tangliangcjy
Copy link

Hi, sorry for not seeing the issue before. What version of stable baselines are you using? Can you try it with the version used by this repository, which should be stable-baselines3==1.4.0? Or with the provided docker image directly?

I try it to train by using stable-baselines3==1.4.0,but i encountered the same problem.I test it with pretrain result is well.

@dHonerkamp
Copy link
Collaborator

Thanks for bringing this up. It looks like a modification that passed the indices through the vecenv wrepper did not make it into this version of the code. I've just added the missing component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants