Python3.3 + SQLAlchemy + PyMySQL で発生したエラー

/tmp/python/virtualenvs/py3kproject/lib/python3.3/site-packages/pymysql/converters.py line 116 in convert_datetime
      if ' ' in obj:
   TypeError: Type str doesn't support the buffer API

ってエラーが出た。


原因は

SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://sample:sample@localhost/sample_test?charset=utf8&use_unicode=0'

の use_unicode=0 があったから。
Python2.7 の時につけていたのでそのままにしていた。


参考

あざす!!