peewee insert 数据时报错:'buffer' object has no attribute 'translate'

  • 错误信息: "'buffer' object has no attribute 'translate'"
  • 场景:使用peewee insert 数据时,BlobField 字段存储zlib compress压缩的数据
  • 解决办法:需要指定pymysql的版本小于0.6.7 否则会报错
  • 参考
原文地址:https://www.cnblogs.com/xueweihan/p/6277800.html