“MongoError: Can't extract geo keys from object” with Type : Point

前端 未结 6 1127
伪装坚强ぢ
伪装坚强ぢ 2020-12-15 19:28

I try to prepare my database field for geocoding with this:

MyCollection._ensureIndex({\'data.address.located\':\'2dsphere\'});

But then th

6条回答
  •  臣服心动
    2020-12-15 20:10

    I had the same problem while my longitude, latitude order was correct. My mistake was that I had written coordiantes instead of coordinates the mongo gave me this:

    pymongo.errors.WriteError: Can't extract geo keys: {data}  Point must be an array or object
    

    so maybe you have the right ordering but you have problem in your key names.

提交回复
热议问题