for itemid in self.itemids:
w = self.ws.add_sheet(itemid + u"商品评价")
pos = 0
for key in robj:
w.write(0, pos, robj[pos])
pos = pos + 1
t = threading.Thread(target=self.getReview, args=(w, itemid))
t.start()
threads.append(t)
for thread in threads:
thread.join()
print("All jobs done!")
Exception in thread Thread-23:Traceback (most recent call last): File "C:\Users\alex\Anaconda3\lib\threading.py", line 916, in _bootstrap_inner self.run() File "C:\Users\alex\Anaconda3\lib\threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "<ipython-input-21-b2b75b1a8d60>", line 126, in getReview w.write(excel_row, pos, robj[pos]) File "C:\Users\alex\Anaconda3\lib\site-packages\xlwt\Worksheet.py", line 1088, in write self.row(r).write(c, label, style) File "C:\Users\alex\Anaconda3\lib\site-packages\xlwt\Row.py", line 254, in write raise Exception("Unexpected data type %r" % type(label))Exception: Unexpected data type <class 'dict'>