Skip to content

URLError temporary solution #81

@mrzimu

Description

@mrzimu

Hi, I've fixed the URLError bug of language-check installation, which seems a temporary solution.

On line 19, add a function

    from urllib.request import urlopen, Request

On line 128, add headers

        headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0'}
        req = Request(url=url, headers=headers)
        with closing(urlopen(req)) as u:
"""
Reference: https://blog.csdn.net/eric_sunah/article/details/11301873
"""

Actually just add a header and the installatiion will be okay.

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