将应用程序部署到 Google App Engine 后,会针对(看起来像)随机请求发出此警告。
/sqlalchemy/dialects/mysql/base.py:2452: SAWarning: No 'character_set_name' can be detected with this MySQL-Python version; please upgrade to a recent version of MySQL-Python. Assuming latin1.
sql 服务器是 Google Cloud SQL。
有没有办法修复它(也许将 character_set_name
设置为某个值)或者它完全取决于 App Engine 附带的 MySQL-Python 版本?
最佳答案
如果我使用,我会遇到这个问题:
create_engine('mysql+gaerdbms:///xxx?instance=xxx:xxx')
但是,如果你使用它就会消失:
create_engine('mysql://root@127.0.0.1:3306/xxx?unix_socket=/cloudsql/xxx:xxx')
关于python - GAE 中的 SQLAlchemy 'character_set_name' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26934978/