Skip to content

Instantly share code, notes, and snippets.

@r1235613
Created February 5, 2019 15:32
Show Gist options
  • Save r1235613/bb561c69449b99f50258591825673b1b to your computer and use it in GitHub Desktop.
Save r1235613/bb561c69449b99f50258591825673b1b to your computer and use it in GitHub Desktop.
SQLALCHEMY error
sqlalchemy.exc.InternalError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely) (pymysql.err.InternalError) (1366, "Incorrect string value: '\\xE4\\xB8\\x80\\xE5\\xAE\\xBF' for column `dorm-dev`.`TaskChicken`.`dorm` at row 1") [SQL: 'INSERT INTO `TaskChicken` (bed_id, dorm, room, bed, unit, stuff_id, name, sex, credentials, is_lived, live_time, who_do_it) VALUES (%(bed_id)s, %(dorm)s, %(room)s, %(bed)s, %(unit)s, %(stuff_id)s, %(name)s, %(sex)s, %(credentials)s, %(is_lived)s, %(live_time)s, %(who_do_it)s)'] [parameters: {'bed_id': 1635, 'dorm': '一宿', 'room': 'B205', 'bed': 'A', 'unit': '應該四', 'stuff_id': 10925171, 'name': '謝O翰', 'sex': '男', 'credentials': 'F999999999', 'is_lived': None, 'live_time': None, 'who_do_it': None}] (Background on this error at: http://sqlalche.me/e/2j85)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment