【python】问题汇总

1.pip降级

python -m pip install pip==9.0.3

 

2. Flask利用pymysql出现Warning:1366的解决办法

错误提示:
(1366, "Incorrect string value: '\\xD6\\xD0\\xB9\\xFA\\xB1\\xEA...' for column 'VARIABLE_VALUE' at row 484)
前提使用flask+pymysql 配置链接数据库,运行的时候报错 app.config["SQLALCHEMY_DATABASE_URI"] = "mysql+pymysql://username:password@localhost:3306/d_movie" app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = True 修改方式,运行成功 安装:pip3 install mysql-connector-python app.config["SQLALCHEMY_DATABASE_URI"] = "mysql+mysqlconnector://username:password@localhost:3306/d_movie" app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = True

  

 

posted @ 2019-01-30 15:01  WANG-X  阅读(125)  评论(0编辑  收藏  举报