Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLError temporary solution #81

Open
mrzimu opened this issue Jan 7, 2022 · 1 comment
Open

URLError temporary solution #81

mrzimu opened this issue Jan 7, 2022 · 1 comment

Comments

@mrzimu
Copy link

mrzimu commented Jan 7, 2022

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.

@MCFreddie777
Copy link

MCFreddie777 commented Feb 5, 2022

Already done in #79, just not merged yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants