【MySQL_BUG】numpy无属性translate+Incorrect string value

  • AttributeError: ‘numpy.float32’ object has no attribute ‘translate’
    在这里插入图片描述
    why:mysql似乎不支持numpy类型的数据直接保存,需要强制转换下
    solution:
rect = {
    
    "x0": float(left), "y0": float(top), "x1": float(right), "y1": float(bottom)}
  • InternalError: (pymysql.err.InternalError) (1366, "Incorrect string value: '\xE6\xAD…
    PS:这个错误的产生也比较有意思,win下系列操作时好使的,但是到了linux下载进行数据保存时就崩了
    solution:参照
alter table 表名 convert to character set utf8mb4;

猜你喜欢

转载自blog.csdn.net/qq_40265247/article/details/106868240