补个坑: 使用mysql按照视频代码出现了编码错误问题 UnicodeEncodeError: 'charmap' codec can't encode character '\u7701' in posit 不要怀疑,不是你代码写错了。 解决方法: engine = create_engine(SQLALCHEMY_DATABASE_URL, encoding='utf-8', echo=True)=》 engine = create_engine('mysql://user:password@127.0.0.1:3306/cll?charset=utf8', echo=True)
太厉害了你
engine = create_engine(SQLALCHEMY_DATABASE_URL, encoding='utf-8', echo=True) ##上面替换为下面 engine = create_engine('mysql://user:password@127.0.0.1:3306/cll?charset=utf8', echo=True)