MongoDB InvalidDocument: Cannot encode object

后端 未结 4 1871
粉色の甜心
粉色の甜心 2021-02-12 15:59

I am using scrapy to scrap blogs and then store the data in mongodb. At first i got the InvalidDocument Exception. So obvious to me is that the data is not in the right encoding

4条回答
  •  孤独总比滥情好
    2021-02-12 16:31

    I got this error when running a query

    db.collection.find({'attr': {'$gte': 20}})
    

    and some records in collection had a non-numeric value for attr.

提交回复
热议问题