this is my code
for code, data in dict_data.items():
try:
collection2.insert({'_id':code,'data':data})
except Exception as e:
print code,'>>>>>>>', str(e)
sys.exit()
it exited with
524715 >>>>>>> strings in documents must be valid UTF-8
I could find out the error only by the try catch method. dict_data is a large dictionary which contains calculated values from other collection.
how can i fix this?
thanks