Sep-26-2019, 07:19 PM
Hi !
I don't know how to upload my array in numpy to msql:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 0: invalid continuation byte
When i setup value in text (i know is wrong) i got record:
('?p???\x07\x00\x0... <- so its wrong
i think i must use VARBINARY value in Mysql column but i dont now how prepare data in python to send in corect format and utf.
I don't know how to upload my array in numpy to msql:
arr=np.zeros((24,7),dtype=object) b = bytes(arr) #print value of: b'\xe0p\x08\xdc\xfe\...' ... do_it = """UPDATE db_db.bytedata SET bDATA=%s WHERE id =%s""" mycursor.execute(do_it, (b,id,))In mysql i setup colum value as BLOB but i got:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 0: invalid continuation byte
When i setup value in text (i know is wrong) i got record:
('?p???\x07\x00\x0... <- so its wrong

i think i must use VARBINARY value in Mysql column but i dont now how prepare data in python to send in corect format and utf.
