Skip to content

[Question] Intermittent NoneType Unpacking Error in step_wait() #371

@syx11237744

Description

@syx11237744

Required prerequisites

Questions

I encountered an intermittent error while running training using this repository. The error occurs occasionally and is not easily reproducible with the same configuration. I am running another task on a different GPU at the same time. Could this cause interference?

Processing rollout for epoch: 21... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸ 100% 0:00:01
Traceback (most recent call last):
File "/home/sunyuanxu/Algorithm/examples/train_policy.py", line 96, in
agent.learn()
File "/home/sunyuanxu/Algorithm/omnisafe/algorithms/algo_wrapper.py", line 187, in learn
ep_ret, ep_cost, ep_len = self.agent.learn()
File "/home/sunyuanxu/Algorithm/omnisafe/algorithms/on_policy/base/policy_gradient.py", line 260, in learn
self._env.rollout(
File "/home/sunyuanxu/Algorithm/omnisafe/adapter/my_adapter.py", line 47, in rollout
next_obs, reward, cost, terminated, truncated, info = self.step(act)
File "/home/sunyuanxu/Algorithm/omnisafe/adapter/online_adapter.py", line 205, in step
return self._env.step(action)
File "/home/sunyuanxu/Algorithm/omnisafe/envs/wrapper.py", line 514, in step
return super().step(action)
File "/home/sunyuanxu/Algorithm/omnisafe/envs/core.py", line 245, in step
return self._env.step(action)
File "/home/sunyuanxu/Algorithm/omnisafe/envs/wrapper.py", line 231, in step
obs, reward, cost, terminated, truncated, info = super().step(action)
File "/home/sunyuanxu/Algorithm/omnisafe/envs/core.py", line 245, in step
return self._env.step(action)
File "/home/sunyuanxu/Algorithm/omnisafe/envs/safety_gymnasium_env.py", line 190, in step
obs, reward, cost, terminated, truncated, info = self._env.step(
File "/home/sunyuanxu/miniconda3/envs/new_omnisafe/lib/python3.10/site-packages/gymnasium/vector/vector_env.py", line 203, in step
return self.step_wait()
File "/home/sunyuanxu/new-safety-gymnasium/safety_gymnasium/vector/async_vector_env.py", line 123, in step_wait
obs, rew, cost, terminated, truncated, info = result
TypeError: cannot unpack non-iterable NoneType object

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions