Python 应用程序引擎标准上的Postgres-插入时出错
appenginestandard只支持python2,库必须是纯python,所以我使用SQLAlchemy和pg8000(纯python而不是psycopg2)连接到一个Postgres实例。连接没有任何问题,但当尝试插入时,我得到以下错误,我不完全理解:Python 应用程序引擎标准上的Postgres-插入时出错,python,postgresql,google-app-engine,Python,Postgresql,Google App Engine,appenginestandard只支持python2,库必须是纯python,所以我使用SQLAlchemy和pg8000(纯python而不是psycopg2)连接到一个Postgres实例。连接没有任何问题,但当尝试插入时,我得到以下错误,我不完全理解: <type 'memoryview'> has type <type 'memoryview'>, but expected one of: str, unicode 任何帮助都将不胜感激——或者如果您成功地将P
<type 'memoryview'> has type <type 'memoryview'>, but expected one of: str, unicode
任何帮助都将不胜感激——或者如果您成功地将Postgres连接到App Engine Standard,我愿意接受除使用pg8000之外的任何替代解决方案。您可能需要在db连接中添加
ssl=True
pg8000.connect(ssl=True, **config)
或者在炼金术中:
create_engine('postgresql+pg8000://user:pass@hostname/dbname', connect_args={'ssl': True}, echo=True)
create_engine('postgresql+pg8000://user:pass@hostname/dbname', connect_args={'ssl': True}, echo=True)