Setting up proxies for python requests

I am trying to setup proxies for python requests. I am using the trio package in order to run requests asynchronously, so I have an array of dicts for my proxies.

For example:

import trio
import requests

proxies = {'https': ''}, {'https': ''}, {'https': ''}, {'https': ''}, {'https': ''}

async def run(task):
    s = requests.Session()
    ip = s.get('', proxies=proxies[task], headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36'})
    print("{} {}".format(task, ip.text))

async def parent():
    async with trio.open_nursery() as nursery:
        for x in range(5):
            nursery.start_soon(run, x)

if __name__ == "__main__":

My problem is that python requests runs even if one of the proxies is bad and so I'm not sure what's going on.

Could someone help me raise an exception when the proxy fails, rather than just proceeding without one?