Skip to content

python3.11 -m unidic download fails due to 403 error from Github #16

@Plusarc

Description

@Plusarc
$ python3.11 -m unidic download
✘ Server error (403)
Couldn't fetch dictionary info. If this error persists please open an issue.

curl https://raw.githubusercontent.com/polm/unidic-py/master/dicts.json can get the response correctly.
Changed the header of request and it worked, so maybe github is blocking request by header

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
}
requests.get(
    "https://raw.githubusercontent.com/polm/unidic-py/master/dicts.json",
    headers=headers
)

We may need to update the request header to avoid being blocked by github. Thanks.

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