Start a new topic
Answered

Unhandled error in Deferred

I've been trying to run an spider on Scrapy Cloud and this error "Unhandled error in Deferred" is raised, I don't know why. The spider is working well in local.

txt

Best Answer

Yes, the scraper finally worked. I was propagating a response (I needed to do it) using the meta key, it worked in local. I solved the problem passing the response using functools.partial.


I got the same issue. 

When I passed the ItemLoader object to callback function, 

with passing the response object, it works on local but not on Scrapinghub. 


Make sure use

item = MyItem()

 not like

item = MyItem(response=response)

when you deploy. 



Scrapy: Requests and Responses

Did the spider extracted any elements beyond the error?


Try to check if all your file resources in locally are the same as in Scrapy cloud. 


Best,


Pablo

Answer

Yes, the scraper finally worked. I was propagating a response (I needed to do it) using the meta key, it worked in local. I solved the problem passing the response using functools.partial.

Login to post a comment