scrapy shell:Scrapy,终端startproject,显示错误TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接

先重启,或可以解决问题

F:\python_project\test>scrapy startproject spz

Traceback (most recent call last):
File “d:\python3.6\lib\runpy.py”, line 193, in _run_module_as_main
main“, mod_spec)
File “d:\python3.6\lib\runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “D:\python3.6\Scripts\scrapy.exe__main__.py”, line 5, in
File “d:\python3.6\lib\site-packages\scrapy\cmdline.py”, line 9, in
from scrapy.crawler import CrawlerProcess
File “d:\python3.6\lib\site-packages\scrapy\crawler.py”, line 7, in
from twisted.internet import reactor, defer
File “d:\python3.6\lib\site-packages\twisted\internet\reactor.py”, line 39, in
default.install()
File “d:\python3.6\lib\site-packages\twisted\internet\selectreactor.py”, line 196, in install
reactor = SelectReactor()
File “d:\python3.6\lib\site-packages\twisted\internet\selectreactor.py”, line 72, in init
posixbase.PosixReactorBase.init(self)
File “d:\python3.6\lib\site-packages\twisted\internet\base.py”, line 515, in init
self.installWaker()
File “d:\python3.6\lib\site-packages\twisted\internet\posixbase.py”, line 284, in installWaker
self.waker = self._wakerFactory(self)
File “d:\python3.6\lib\site-packages\twisted\internet\posixbase.py”, line 79, in init
client.connect(server.getsockname())
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

点击允许应用通过防火墙

点击更改设置,如果中间的列表里有,可以直接设置,也可以点击允许其他应用来添加。

也可以控制面板(运行->control)打开防火墙

被防火墙挡住的具体是啥我也不知道,总之关了防火墙,运行成功后,再次打开防火墙,运行都不会被挡着了。

你可能感兴趣的:(scrapy)