0

命令是:

db.command({'convertToCapped': 'info', size:100000})

Traceback (most recent call last):
File "<pyshell#18>", line 1, in <module>
db.command({'convertToCapped': 'info', size:100000})
NameError: name 'size' is not defined
4

1 回答 1

1

据我了解,您需要使用 pymongo 运行这样的命令:

db.command( "convertToCapped', 'info', size = 100000 );

http://api.mongodb.org/python/current/api/pymongo/database.html#pymongo.database.Database.command所述

于 2013-07-25T10:20:39.430 回答