try fix error

TypeError: bytearray indices must be integers