- tid, text = line.strip().split(" ", 1)
- tweets[int(tid)] = text.decode("utf-8")
+ try:
+ tid, text = line.strip().split(" ", 1)
+ tweets[int(tid)] = text.decode("utf-8")
+ except Exception as e:
+ err("loading tweet %s failed due to %s" % (line, unicode(e)))