TypeError: decoding str is not supported

Not sure about what you expect str('Speed -', str(speed)) to do.

What you want is a string concat:

speedE2 = 'Speed -' + str(speed)
# replace other lines also

You can also use string formatting and not worry about type casts:

speedE2 = 'Speed -{}'.format(speed)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)