Skip to content

ValueError: 'go.magik.ly' does not appear to be an IPv4 or IPv6 address #163

Open

Description

@septfish

I followed the official documentation and added a link to report this. Using curio ’s taskgroups, there were no errors. Can anyone help me explain what the reasons are and how to operate them correctly

Activity

  1. carlbordum commented on May 11, 2020

    @carlbordum
    Contributor

    Hi @septfish. Can you share a code snippet that gives this error?

    thanks :-)

  2. septfish commented on May 13, 2020

    @septfish
    Author

    def test2():
    results = {}
    url_list = ['http://www.baidu.com']
    async def worker(key, url):
    r = await s.get(url)
    results[key] = r

    async def main(url_list):
        url_dict = dict(enumerate(url_list))
        for key, url in url_dict.items():
            await curio.spawn(worker(key, url))
    
    sorted_results = [response for _, response in sorted(results.items())]
    
    s = asks.Session(connections=10)
    curio.run(main(url_list))
    return sorted_results
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions