facebookarchive / flashback

Capture and replay real mongodb workloads

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python record gives configuration error unknown option slaveOk

ys-roposo opened this issue · comments

Traceback (most recent call last):
File "record.py", line 527, in
main()
File "record.py", line 516, in main
recorder = MongoQueryRecorder(db_config)
File "record.py", line 144, in init
self.oplog_clients[server_string] = self.connect_mongo(server)
File "record.py", line 274, in connect_mongo
client = MongoClient(server_config['mongodb_uri'], slaveOk=True)
File "/Users/yayati/CodePlay/python/venv/lib/python2.7/site-packages/pymongo/mongo_client.py", line 342, in init
for k, v in keyword_opts.items())
File "/Users/yayati/CodePlay/python/venv/lib/python2.7/site-packages/pymongo/mongo_client.py", line 342, in
for k, v in keyword_opts.items())
File "/Users/yayati/CodePlay/python/venv/lib/python2.7/site-packages/pymongo/common.py", line 465, in validate
value = validator(option, value)
File "/Users/yayati/CodePlay/python/venv/lib/python2.7/site-packages/pymongo/common.py", line 107, in raise_config_error
raise ConfigurationError("Unknown option %s" % (key,))
pymongo.errors.ConfigurationError: Unknown option slaveOk

using python 2.7, pymongo 3.2.1 and under virtual env 14.0.0

pymongo 3.x is not compatible, resolved by using pymongo 2.9.2

leaving the issue open as pymongo version dependency needs to be updated in the installation note.

Thanks. Updated README.