dmaslov/flask-blog

Error message in file post.py

wujianv5 opened this issue · 5 comments

Got a error when I run python web.py runserver

Error type: OperationFailure in file: post.py on line: 101

Error details: command SON([('aggregate', u'posts'), ('pipeline', [{'$unwind': '$tags'}, {'$group': {'count': {'$sum': 1}, '_id': '$tags'}}, {'$sort': {'count': -1}}, {'$limit': 10}, {'$project': {'count': 1, '_id': 0, 'title': '$_id'}}])]) failed: no such cmd: aggregate

But it seems everything works fine after it's installed.

Thank for feedback! I'll see what's wrong

@wuasiam
I can't reproduce this bug. I need more details, if you don't mind.
What is your OS
What mongoDB version installed? Mongo installed locally, or on remote server, for example mongolab?
python version 2.7.x?
Did you do all process from scratch like i write in README.md?
Something else what i need to know? :)
Thanks for reply in advance!

Thanks for the response.

Debian GNU/Linux 7
MongoDB v2.0.6 installed locally
Python 2.7.3

I don't use virtualenv.
Could that be the problem?

On Fri, Mar 28, 2014 at 5:49 AM, Dmitry Maslov notifications@github.comwrote:

@wuasiam https://github.com/wuasiam
I can't reproduce this bug. I need more details, if you don't mind.
What is your OS
What mongoDB version installed? Mongo installed locally, or on remote
server, for example mongolab?
python version 2.7.x?
Did you do all process from scratch like i write in README.md?
Something else what i need to know? :)
Thanks for reply in advance!

Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-38865177
.

Aggregate required mongodb 2.2 or newer. If you are using Ubuntu, uninstall mongodb and follow the instructions at http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ to get the newer version.

@pobiega Thanks for reply! I think upgrade to newer version than 2.0.6 will solve the problem. I'll close this issue. @wuasiam If this issue still actual for you, could you please respond about this solution?