Take the 2-minute tour ×
Exception Type: OperationFailure at /
Exception Value: database error: point not in range

My code is this:

user_center = [ user_utm[1], user_utm[2] ]
user_radius = tools.milesToMeters(request.session['browser_distance'])

results = db.datasets.find({"test_set":"g2", "loc_utm": {"$within": {"$center" : [ user_center, user_radius ] }}});

For my Mongo query, I did this:

db.datasets.ensureIndex({"loc_utm":"2d"}, {"min":-999999999999, "max":99999999999 } );

My user_center and user_radius is this, when I printed it out:

[553068.42444848095, 4181244.9741927907]

All my documents in my mongo collection have a UTM very similar to the user_center, so it should get the query. But, instead of returning the documents, I get this weird error.

share|improve this question
Can you debug user_center and user_radius? What is the output value? –  jpartogi Jan 1 '11 at 3:25
the output value is this: [553068.42444848095, 4181244.9741927907] and 16093.44 –  TIMEX Jan 1 '11 at 3:47

1 Answer 1

up vote 6 down vote accepted

If you run Mongodb Version 1.4.0/1.5.0 you should upgrade to 1.5.2 where that kind of issue has been fixed.

share|improve this answer
I'm getting this on MongoDB 1.8.3 –  sardaukar Dec 21 '11 at 13:06

Your Answer


