Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "dbevent.py", line 18, in <module>
- cursor.execute(data)
- [...]
- self.description = self._result and self._result.describe() or None
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 1: invalid
- continuation byte
- import MySQLdb
- db = MySQLdb.connect(host="",
- user="",
- passwd="",
- db="modelo_conexion")
- cursor = db.cursor()
- query = "SELECT * FROM "
- table = "2017_maq_u02"
- data = query + table
- cursor.execute(data)
- results = cursor.fetchone()
- print(results)
- db.close()
Add Comment
Please, Sign In to add comment