Recently, I used nltk as a downloader in my homework related to automatic Q & A. I used another computer to solve the problem, but I didn’t record the solution. I immediately forgot and spent about 2 hours looking for a solution. Therefore, I want to record the solution now.
import nltk nltk.download('stopwords') nltk.download('reuters') nltk.download('punkt')
When executing the above code, an error is found
error loading stopwords: & lt; Urlopen error [errno 11004] getaddrinfo failed , the following methods are available through practical operation.
Find the hosts file under
C: \ windows \ system32 \ drivers \ etc , open it as an administrator, and add the following line of IP address to the end of hosts.
As shown in the figure below,
The address of raw.github is changed frequently, resulting in unsuccessful download
It is possible that the address may be changed frequently, resulting in unsuccessful downloading. We can open the website for querying the IP address: https://www.ipaddress.com/ Enter
raw. Githubusercontent. Com to find the corresponding new IP address.
give an example
We have added the IP address to the hosts and found that it was still unsuccessful. Therefore, let’s see if the download failed due to the change of the IP address of raw.github. We open
https://websites.ipaddress.com/ website, enter
raw.githubusercontent.com , and click look up
. It is found that four IPS have been found. We replace the content in hosts with
Then we re execute and find success.
If the above solutions are not solved, you can leave a message and we can communicate together~
The above solutions are from the solution reference link. Thank you very much!!
- Solve the MAC terminal download error curl: (7) failed to connect to raw.githubusercontent.com port 443: Connection refused
- How to solve problems like curl: (7) failed to connect to raw.githubusercontent.com Port 443: problem with connection used
- Mac running nltk.download () prompt certificate verity failed
- Python error: resource u’tokenizers / Punkt/ english.pickle ‘ not found.
- Ubuntu20.04 installing RVM error curl: (7) failed to connect to raw.githubusercontent.com port 443: Operation timed
- Cargo invoice has failed: error: exit code: 101
- Problem solving: failed to connect to github.com port 443: Operation timed out（2020.06.04）
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- Push failed Unable to access ‘https://github.com/‘: Failed to connect to github.com port 443: Timed
- R language packages installation failed: Error in install.packages: error reading from connection
- download (‘point’) False
- SSH appears warning: remote host identification has changed!
- Using Fiddler to capture mobile app
- Someone is doing something abnormal
- Spark shell startup error, error: not found: value spark (low level solved)
- Svn: a solution to the error of cleanup failed to process the following paths
- Solution to Vue cli · failed to download repo vuejs templates/webpack: connect etimeout followed by an IP digital error message
- Mac install yarn 2020-10-18
- Some problems in installing wsl2 and NVIDIA docker in win10
- Atom live server plug-in installation