You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2019-01-16 15:47:22 [scrapy.core.engine] ERROR: Error while obtaining start requests
Traceback (most recent call last):
File "/home/joaquin/Repos/example/env/lib/python3.6/site-packages/scrapy/core/engine.py", line 127, in _next_request
request = next(slot.start_requests)
File "/home/joaquin/Repos/example/example/spiders/br/rj/example.py", line 128, in start_requests
'dont_redirect': True,
File "/home/joaquin/Repos/example/env/lib/python3.6/site-packages/scrapy/http/request/__init__.py", line 34, in __init__
assert callback or not errback, "Cannot use errback without a callback"
AssertionError: Cannot use errback without a callback
2019-01-16 15:47:22 [scrapy.core.engine] INFO: Closing spider (finished)
2019-01-16 15:47:22 [scrapy.core.engine] INFO: Spider closed (finished)
The text was updated successfully, but these errors were encountered:
when errback is set, callback must be set explicitly.
joaquingx
changed the title
start_requests doesn't set callback to self.parse automatically when errback is set
Request doesn't set callback to self.parse automatically when errback is set
Jan 17, 2019
Hi @RomiVu, thanks for help 🙏. I cannot found a clarification about that in documentation, what I found so far:
callback (callable) – the function that will be called with the response of this request (once its downloaded) as its first parameter. For more information see Passing additional data to callback functions below. If a Request doesn’t specify a callback, the spider’s parse() method will be used. Note that if exceptions are raised during processing, errback is called instead
From https://doc.scrapy.org/en/latest/topics/request-response.html.
If it's expected that ever errback is set also callbackmust be set, I think that it should be documented.
Hi, I'm facing an
AssertionError
when seterrback
and notcallback
inRequest
, is that expected? :trigger this :
The text was updated successfully, but these errors were encountered: