I have problem with memory in python "Python memory error". In fact , I try to recover data from a big .bson file using this script:
with open('xxxx.bson','rb') as f:
data = bson.decode_all(f.read())
error message :
data = bson.decode_all(f.read())
MemoryError
thank you for any help you can provide
You can reduce memory consumption by switching to decode_file_iter, which 1) requires a file (not its contents) as input, and 2) returns a generator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With