1234567891011121314>>> volume1 = Interval.between("A", "Foe")>>> volume2 = Interval.between("Fog", "McAfee")>>> volume3 = I
...
2017-8-28 Pandas agg 使用lambda
12345678910111213141516171819import numpy as npimport pandas as pdN = 100data = pd.DataFrame({ 'type': np.random.randint(10, size=N), 'stat
...
2017-8-27 python 协程加速
2017-8-23 mongo insert_many BulkWriteError
问题:
在对mongo插入数据时,报写入问题,报错信息如下:
1
2
3
4
5
6
7
8
9
10 Traceback (most recent call last):
File "/root/crs/call_history_crawler/worker/communicate.py", line 149, in insert_db_data
if db[table].insert_many(data):
File "/root/crs/call_history_crawler/venv/lib/python2.7/site-packages/pymongo/collection.py", line 684, in insert_many
blk.execute(self.write_concern.document)
File "/root/crs/call_history_crawler/venv/lib/python2.7/site-packages/pymongo/bulk.py", line 470, in execute
return self.execute_command(sock_info, generator, write_concern)
File "/root/crs/call_history_crawler/venv/lib/python2.7/site-packages/pymongo/bulk.py", line 314, in execute_command
raise BulkWriteError(full_result)
BulkWriteError: batch op errors occurred