Created
September 16, 2011 14:45
-
-
Save netdesign/1222268 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class updateDiscHandler(BaseHandler): | |
| def get(self): | |
| owner=self.get_argument("owner") | |
| uid=self.get_argument("uid") | |
| title=self.get_argument("title") | |
| description=self.get_argument("descr") | |
| genre=self.get_argument("gen") | |
| code=self.get_argument("code") | |
| cover=self.get_argument("cover") | |
| print owner | |
| print uid | |
| print description.encode('utf-8') | |
| print genre | |
| print code | |
| print cover | |
| conn = oursql.connect(host="", user="", passwd="", db="") | |
| curs = conn.cursor(plain_query=True) | |
| curs.execute("UPDATE discs SET title=?, abstract=?, gen=?, code=?, cover=? WHERE uid=? and owner=?", (title, description, genre, code, cover, uid, owner)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Traceback (most recent call last): | |
| File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 810, in _stack_context | |
| yield | |
| File "/usr/local/lib/python2.7/site-packages/tornado/stack_context.py", line 77, in StackContext | |
| yield | |
| File "/usr/local/lib/python2.7/site-packages/tornado/web.py", line 827, in _execute | |
| getattr(self, self.request.method.lower())(*args, **kwargs) | |
| File "myDB1.py", line 600, in get | |
| curs.execute("UPDATE discs SET title=?, abstract=?, gen=?, code=?, cover=? WHERE uid=? and owner=?", (title, description, genre, code, cover, uid, owner)) | |
| File "cursor.pyx", line 122, in oursql.Cursor.execute (oursqlx/oursql.c:15820) | |
| File "statement.pyx", line 407, in oursql._Statement.execute (oursqlx/oursql.c:10345) | |
| File "util.pyx", line 91, in oursql._do_warnings_query (oursqlx/oursql.c:3459) | |
| CollatedWarningsError: (None, 'query caused warnings', [(<class 'oursql.Warning'>, (u"Incorrect string value: '\\xE2\\x80\\x8B\\xE2\\x80\\x8B...' for column 'abstract' at row 6", 1366L))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment