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

StopIteration Error #3

Open
XinyiChu opened this issue Aug 23, 2024 · 2 comments
Open

StopIteration Error #3

XinyiChu opened this issue Aug 23, 2024 · 2 comments

Comments

@XinyiChu
Copy link

When I run python train.py . It shows:
Traceback (most recent call last):
File "/workspace/vo_rl/env/svo_wrapper.py", line 85, in get_images_pose
batch = next(self.dataloader_iter)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 104, in main
model.learn(
File "/workspace/vo_rl/rl_algorithms/ppo.py", line 347, in learn
return super().learn(
File "/workspace/vo_rl/rl_algorithms/on_policy_algorithm.py", line 274, in learn
total_timesteps, callback = self._setup_learn(
File "/venv/lib/python3.8/site-packages/stable_baselines3/common/base_class.py", line 423, in _setup_learn
self._last_obs = self.env.reset() # type: ignore[assignment]
File "/workspace/vo_rl/env/svo_wrapper.py", line 213, in reset
images, gt_poses, new_seq = self.get_images_pose()
File "/workspace/vo_rl/env/svo_wrapper.py", line 89, in get_images_pose
batch = next(self.dataloader_iter)
StopIteration
what's wrong with that

@sujit-168
Copy link

same error i meet, , do you have any solution?

@sujit-168
Copy link

same error i meet, , do you have any solution?

By adding debug information, located the problem in func

def __getitem__(self, idx):

need to notice code line as follows

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

2 participants