场景:

pymongo 查询数据库的时候报错。

for gscode in GSList_StockPool_Mongo_MktStop:

  self._collection_flash.find({"ymd": nDateNow, "gscode": gscode}).count() 

 

原因:

不是utf-8编码,gscode 取到的中文是乱码。

 

解决方法:

编码改为utf-8。

  

相关文章:

  • 2021-05-07
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
猜你喜欢
  • 2021-12-04
  • 2022-12-23
  • 2021-05-17
  • 2021-11-06
  • 2021-09-30
  • 2021-09-10
  • 2022-12-23
相关资源
相似解决方案