Traceback (most recent call last):


 "c:\python27\lib\site-packages\twisted\internet\defer.py", line 1260, in _inlineCallbacks

result = g.send(result)


 "c:\python27\lib\site-packages\scrapy\core\downloader\middleware.py", line 37, in process_request

response = yield method(request=request, spider=spider)


 "D:\SinaSpider-master\Sina_spider1\Sina_spider1\middleware.py", line 19, in process_request

cookie = random.choice(cookies)


 "c:\python27\lib\random.py", line 275, in choice

return seq[int(self.random() * len(seq))]
# raises IndexError if seq is empty
IndexError: list index out of range

Traceback (most recent call last):


 "train.py", line 141, in <module>

calculate(x_test,y_test,epoch)


 "train.py", line 63, in calculate

if j<len(y) and id2tag[y[j]][0]=='B':
IndexError: string index out of range