# "No tasks available" on page refresh

**URL:** <https://support.prodi.gy/t/no-tasks-available-on-page-refresh/155>\
**Category:** Uncategorized\
**Tags:** usage, custom, solved\
**Created:** [December 23, 2017, 8:23am UTC](https://support.prodi.gy/t/no-tasks-available-on-page-refresh/155 "2017-12-23T08:23:30Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![MajidD4t1qbit](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@MajidD4t1qbit](https://support.prodi.gy/u/MajidD4t1qbit)\
**Post date:** [December 27, 2018, 7:05pm UTC](https://support.prodi.gy/t/no-tasks-available-on-page-refresh/155/3 "2018-12-27T19:05:35Z")

</div>

> [@ines](#):
>
> To avoid this and make Prodigy keep yielding tasks until they’re all annotated, you can wrap the streaming logic in a `while True` loop:

I have the same exact issue with `image.manual` but the provided snippet does not solve the problem for me (unless I'm using it wrong). When the page is refreshed a few times and it says "No tasks available", the input stream to this function (which would come from the `preprocess.fetch_images` or `loader.get_stream` in case of `image.manual`) actually has reached to its end. This means that `get_stream` in the snippet, just keeps looping in the `while True` loop.

Now, if I change the snippet to re-create the stream when it's fully traversed as follows, it does not stop even after all of the images are traversed.

```
def wrap_stream(source, api, loader):
    while True:
        stream = get_stream(source, api=api, loader=loader, input_key='image')
        stream = fetch_images(stream)
        for task in stream:
            yield task

```

Still trying to fix this, but also would appreciate any pointers.

---

_[View the full topic](https://support.prodi.gy/t/no-tasks-available-on-page-refresh/155)._
