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()
('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()