Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stop Iteration Error
#5
(Mar-30-2021, 09:19 AM)Gribouillis Wrote: If you want to pass it you need to say what the program has to do when there are no more items in the sequence
try:
    tq, q = next(self.incoming)
except StopIteration:
    # No more items in self.incoming --> what to do here?
You can also catch the exception at higher level in the calling stack.

this time I am in a never endless loop...

I will think and try something and will let you know..
Thanks
Reply


Messages In This Thread
Stop Iteration Error - by quest - Mar-30-2021, 08:02 AM
RE: Stop Iteration Error - by Gribouillis - Mar-30-2021, 08:49 AM
RE: Stop Iteration Error - by quest - Mar-30-2021, 09:09 AM
RE: Stop Iteration Error - by Gribouillis - Mar-30-2021, 09:19 AM
RE: Stop Iteration Error - by quest - Mar-30-2021, 10:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to make this error stop ? Mawixy 1 4,382 Apr-19-2022, 03:02 PM
Last Post: Mawixy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020