mysql.connector error reading LONGBLOB
myTable has three columns:
('timeStamp', 'datetime')
('modelName', 'varchar(20)')
('model', 'longblob')
When I try to SELECT from myTable, a TypeError occurs. Not sure why.
............
Error
............
TypeError: sequence item 0: expected string, bytearray found
............
Query
............
import mysql.connector
conn = mysql.connector.connect(user='user'
, password='<removed>'
, host='localhost'
, port=3364
, database='database'
, charset='utf8')
cur = conn.cursor()
cur.execute("""SELECT * FROM myTable;""")
print type(cur)
rows = cur.fetchall()
Subject
Written By
Posted
mysql.connector error reading LONGBLOB
June 13, 2016 12:14PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.