Skip to content

Instantly share code, notes, and snippets.

@netdesign
Created September 17, 2011 17:25
Show Gist options
  • Select an option

  • Save netdesign/1224158 to your computer and use it in GitHub Desktop.

Select an option

Save netdesign/1224158 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
string = "http://www.youtube.com/watch?v=uCEeAn6_QJo YouTube - Tool - Ænema [uncut version - hq - fullscreen]"
#connection to mysql
query.execute("INSERT INTO bookmarks (uid, url, title) VALUES(?, ?, ?)", (myUid, link.attrib['href'], link.text_content()))
TRACEBACK:
Traceback (most recent call last):
File "pythonBookmarksParsing.py", line 37, in <module>
query.execute("INSERT INTO bookmarks (uid, url, title) VALUES(?, ?, ?)", ("popo9090909777272", string, tit))
File "cursor.pyx", line 122, in oursql.Cursor.execute (oursqlx/oursql.c:15820)
File "statement.pyx", line 316, in oursql._Statement.execute (oursqlx/oursql.c:9313)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 17: ordinal not in range(128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment