scrapy yield 出错 Internal StopIteration

代码:
················`
item['focus_nums'] = focus_nums
item['answer_nums'] = answer_nums
item['view_nums'] = view_nums
item['tag'] = response.meta['tag'].encode('utf-8').decode()
pdb.set_trace()
yield item`

···············`
pdb.set_trace()
yield scrapy.Request(url=url, callback=self.Q_parse, meta={'tag': tag})`

出错:
scrapy yield 出错 Internal StopIteration
在yield前一行设置pdb,当执行yield时
抛出Internal StopIteration异常,且此异常我用try-exception无法捕获
代码从scrapy 的parse中直接跳进Twitter函数中
求解


回答:

代码多贴点,还有你的item定义

以上是 scrapy yield 出错 Internal StopIteration 的全部内容, 来源链接: utcz.com/p/937729.html

回到顶部