Mongodb bulk write error
Ok, the problem was that i was assigning _id explicitly and it turns out that the string was larger than 12-byte limit, my bad.
It can be many reasons...
the best is that you try...catch... the exception and check in the errors
from pymongo.errors import BulkWriteError
try:
bulk.execute()
except BulkWriteError as bwe:
print(bwe.details)
#you can also take this component and do more analysis
#werrors = bwe.details['writeErrors']
raise