This looks like a race condition in the test suite.
[2017/03/25 14:43:34.198] ====================================================================== [2017/03/25 14:43:34.198] ERROR: test_gridfs_replica_set (test_gridfs.TestGridfsReplicaSet) [2017/03/25 14:43:34.199] ---------------------------------------------------------------------- [2017/03/25 14:43:34.199] Traceback (most recent call last): [2017/03/25 14:43:34.199] File "/data/mci/b2890471f44659b881e073fb4b39bec9/src/test/test_gridfs.py", line 477, in test_gridfs_replica_set [2017/03/25 14:43:34.199] oid = fs.put(b'foo') [2017/03/25 14:43:34.199] File "gridfs/__init__.py", line 124, in put [2017/03/25 14:43:34.199] grid_file.close() [2017/03/25 14:43:34.199] File "gridfs/grid_file.py", line 295, in close [2017/03/25 14:43:34.199] self.__flush() [2017/03/25 14:43:34.199] File "gridfs/grid_file.py", line 274, in __flush [2017/03/25 14:43:34.199] self.__flush_buffer() [2017/03/25 14:43:34.199] File "gridfs/grid_file.py", line 266, in __flush_buffer [2017/03/25 14:43:34.199] self.__flush_data(self._buffer.getvalue()) [2017/03/25 14:43:34.199] File "gridfs/grid_file.py", line 245, in __flush_data [2017/03/25 14:43:34.199] self.__ensure_indexes() [2017/03/25 14:43:34.199] File "gridfs/grid_file.py", line 187, in __ensure_indexes [2017/03/25 14:43:34.199] self.__create_index(self._coll.files, _F_INDEX, False) [2017/03/25 14:43:34.199] File "gridfs/grid_file.py", line 176, in __create_index [2017/03/25 14:43:34.199] doc = collection.find_one(projection={"_id": 1}) [2017/03/25 14:43:34.199] File "/data/mci/b2890471f44659b881e073fb4b39bec9/src/pymongo/collection.py", line 1102, in find_one [2017/03/25 14:43:34.199] for result in cursor.limit(-1): [2017/03/25 14:43:34.199] File "/data/mci/b2890471f44659b881e073fb4b39bec9/src/pymongo/cursor.py", line 1114, in next [2017/03/25 14:43:34.199] if len(self.__data) or self._refresh(): [2017/03/25 14:43:34.199] File "/data/mci/b2890471f44659b881e073fb4b39bec9/src/pymongo/cursor.py", line 1036, in _refresh [2017/03/25 14:43:34.199] self.__collation)) [2017/03/25 14:43:34.199] File "/data/mci/b2890471f44659b881e073fb4b39bec9/src/pymongo/cursor.py", line 928, in __send_message [2017/03/25 14:43:34.199] helpers._check_command_response(doc['data'][0]) [2017/03/25 14:43:34.199] File "/data/mci/b2890471f44659b881e073fb4b39bec9/src/pymongo/helpers.py", line 210, in _check_command_response [2017/03/25 14:43:34.199] raise OperationFailure(msg % errmsg, code, response) [2017/03/25 14:43:34.199] OperationFailure: Executor error during find command: OperationFailed: Operation aborted because: all indexes on collection dropped