when I run scrapy,this happened exceptions.TypeError: _getEndpoint() takes exactly 4 arguments (2 given)

191 views
Skip to first unread message

crawler

unread,
May 19, 2015, 10:36:48 PM5/19/15
to scrapy...@googlegroups.com
when I run scrapy this happened:

2015-05-19 22:27:35-0400 [scrapy] NOLEVEL: Current UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3
2015-05-19 22:27:36-0400 [lt1] ERROR: Error downloading <GET http://************************>
 File "/usr/local/lib/python2.7/site-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/internet/base.py", line 1203, in mainLoop
   self.runUntilCurrent()
 File "/usr/local/lib/python2.7/site-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/internet/base.py", line 825, in runUntilCurrent
   call.func(*call.args, **call.kw)
 File "/usr/local/lib/python2.7/site-packages/Scrapy-0.24.4-py2.7.egg/scrapy/core/downloader/__init__.py", line 143, in _process_queue
   dfd = self._download(slot, request, spider)
 File "/usr/local/lib/python2.7/site-packages/Scrapy-0.24.4-py2.7.egg/scrapy/core/downloader/__init__.py", line 154, in _download
   dfd = mustbe_deferred(self.handlers.download_request, request, spider)
--- <exception caught here> ---
 File "/usr/local/lib/python2.7/site-packages/Scrapy-0.24.4-py2.7.egg/scrapy/utils/defer.py", line 39, in mustbe_deferred
   result = f(*args, **kw)
 File "/usr/local/lib/python2.7/site-packages/Scrapy-0.24.4-py2.7.egg/scrapy/core/downloader/handlers/__init__.py", line 40, in download_request
   return handler(request, spider)
 File "/usr/local/lib/python2.7/site-packages/Scrapy-0.24.4-py2.7.egg/scrapy/core/downloader/handlers/http11.py", line 36, in download_request
   return agent.download_request(request)
 File "/usr/local/lib/python2.7/site-packages/Scrapy-0.24.4-py2.7.egg/scrapy/core/downloader/handlers/http11.py", line 174, in download_request
   d = agent.request(method, url, headers, bodyproducer)
 File "/usr/local/lib/python2.7/site-packages/Twisted-15.2.0-py2.7-linux-x86_64.egg/twisted/web/client.py", line 1559, in request
   endpoint = self._getEndpoint(parsedURI)
exceptions.TypeError: _getEndpoint() takes exactly 4 arguments (2 given)


I find some answer in stackoverflow,but they all say update Twisted-15.2.0 can resolve this problem,then I updated Twisted,but the problem happened too,hope you can help me.


crawler

unread,
May 19, 2015, 10:56:40 PM5/19/15
to scrapy...@googlegroups.com
i find the answer, I updated scrapy version to 0.24.6,the problem resolved.

在 2015年5月20日星期三 UTC+8上午10:36:48,crawler写道:
Reply all
Reply to author
Forward
0 new messages