你应该试试:
from bson import BSON with open('dump/coll.bson', 'rb') as f: coll_raw = f.read() coll = bson.decode_all(coll_raw)