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

Getting Error: RuntimeError: generator raised StopIteration #58

Open
lukerbs opened this issue Feb 16, 2022 · 2 comments
Open

Getting Error: RuntimeError: generator raised StopIteration #58

lukerbs opened this issue Feb 16, 2022 · 2 comments

Comments

@lukerbs
Copy link

lukerbs commented Feb 16, 2022

Traceback (most recent call last):
File "/Users/luke/Projects/DW2TF/util/reader.py", line 84, in get_block
line = next(line_getter)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "main.py", line 117, in
main(args)
File "main.py", line 58, in main
parse_net(args.layers, args.cfg, args.weights, args.training)
File "main.py", line 26, in parse_net
for ith, layer in enumerate(cfg_walker):
RuntimeError: generator raised StopIteration

@PadalaKavya
Copy link

I am having the same issue
Traceback (most recent call last):
File "/content/gdrive/MyDrive/new_folder/DW2TF/util/reader.py", line 84, in get_block
line = next(line_getter)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "main.py", line 116, in
main(args)
File "main.py", line 57, in main
parse_net(args.layers, args.cfg, args.weights, args.training)
File "main.py", line 25, in parse_net
for ith, layer in enumerate(cfg_walker):
RuntimeError: generator raised StopIteration

@PadalaKavya
Copy link

This can be resolve by using try and except in the "DW2TF/util/reader.py"
At line 84 add
try:
....
except stopIteration:
return

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