Local MySQLdb connection fails with AttributeError for paramstyle when running GAE development server

感情迁移 提交于 2019-12-03 09:27:40

This means the MySQLdb module is missing and failed to import. The GAE SDK does not itself come with the MySQLdb client library; install MySQLdb (as instructed in the SDK documentation):

venv/bin/pip install mysql-python

or use your OS package manager to install MySQLdb in your system python.

The error is caused by the Google google.appengine.api.rdbms_mysqldb module, acting as a stub, not having a paramstyle attribute when import MySQLdb fails. A stub connect() function is provided that'll raise a more helpful exception, but due to an unfortunate interaction with SQLAlchemy the error there is a lot less informative.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!