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': 'http://159.224.176.205:53281'}, {'https': 'http://61.97.130.196:31588'}, {'https': 'http://190.216.7.3:8181'}, {'https': 'http://159.65.9.66:3128'}, {'https': 'http://94.130.14.146:31288'}


async def run(task):
    s = requests.Session()
    ip = s.get('https://www.iplocation.net', 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__":
    trio.run(parent)

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?

Thanks.