question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to download NLTK data: HTTP ERROR 405 / 403

See original GitHub issue
>>> nltk.download("all")
[nltk_data] Error loading all: HTTP Error 405: Not allowed.

>>> nltk.version_info
sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)

Also, I tried to visit https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/corpora/cmudict.zip. Got the same HTTP 405 ERROR.

Find the same problem on stackoverflow: https://stackoverflow.com/questions/45318066/getting-405-while-trying-to-download-nltk-dta

Any comments would be appreciated.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:47 (22 by maintainers)

github_iconTop GitHub Comments

11reactions
rvausecommented, Jul 26, 2017

@plaihonen you should be able to use this alternative index by doing something like python -m nltk.downloader -u https://pastebin.com/raw/D3TBY4Mj punkt

8reactions
alvationscommented, Jul 27, 2017

It seems like the Github is down/blocking access to the raw content on the repo.

Meanwhile the temporary solution is something like this:

PATH_TO_NLTK_DATA=/home/username/nltk_data/
wget https://github.com/nltk/nltk_data/archive/gh-pages.zip
unzip gh-pages.zip
mv nltk_data-gh-pages/ $PATH_TO_NLTK_DATA

Currently downloading the gh-pages.zip and replacing the nltk_data directory is the working solution for now.

Before we find on another channel to distribute nltk_data, please use the above solution.


~Strangely, it only seems to affect the nltk user account. It works fine on the fork: https://raw.githubusercontent.com/alvations/nltk_data/gh-pages/index.xml~

~Doing this would work too:~

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP Error 403 Forbidden - when downloading nltk data
I am facing some problem for accessing nltk data . I have tried nltk.download() . The gui page has come with HTTP Error...
Read more >
Error in Downloading NLTK Packages : Forums
Are you sure it's 405 and not 403? I believe some nltk data is not downloaded from .nltk.org, and so our proxy doesn't...
Read more >
nltk.download() error - Google Groups
nltk.download() after installing nltk, but I am having the following error message: ... 402 req = meth(req) 403 --> 404 response = self._open(req,...
Read more >
HTTP Error 403 Forbidden - when downloading nltk data
I am facing some problem for accessing nltk data . I have tried nltk.download() . The gui page has come with HTTP Error...
Read more >
No Route To Host' Error In Installing 'Nltk Data' - ADocLib
I want to use nltk for my project but it is not downloading that and giving me ... Failed to download NLTK data:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found