python – nltk下载[错误11004] getadderinfo失败

当我尝试再次重新启动下载时,这是错误

有时它可以工作,但自从新的win7我无法从nltk下载任何数据

 nltk.download()

showing info http://nltk.github.com/nltk_data/
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__
 return self.func(*args)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 495, in callit
 func(*args)
File "C:\Python27\lib\site-packages\nltk\downloader.py", line 1893, in_monitor_message_queue
self._select(msg.package.id)
AttributeError: 'str' object has no attribute 'id'

最佳答案 我面临同样的问题.我的问题是,当NLTK下载程序启动时,服务器索引为-
http://nltk.github.com/nltk_data/

这需要更改为 – http://nltk.org/nltk_data/

您可以通过进入NLTK Downloader窗口和File-> Change Server Index来更改此设置.

点赞