3

I am trying using nltk in my project and in order to download the nltk data you are supposed to do:

>>> import nltk
>>> nltk.download()

However, I keep getting the HTTP error 403. I checked online and everyone says to change the default URL to the newest nltk url, but it hasn't worked and I keep getting the error. Any clues?

Eric Agredo
  • 397
  • 1
  • 3
  • 11

2 Answers2

2

As @alvas suggested on this page, this is an easy fix:

from nltk.downloader import Downloader
dler = Downloader('https://pastebin.com/raw/D3TBY4Mj')
dler.download()

Getting 405 error while trying to download nltk data

Boban
  • 7,147
  • 11
  • 41
  • 75
0

You may have to set proxy like this:

nltk.set_proxy('url', 'username', 'password')
Rohan Amrute
  • 734
  • 9
  • 22