Python 3.7.2 error


#1

Hi,
When I run the following Script in Windows10 (64bit) with Python 3.7.2 I get an error:

This is the Code:

#!/usr/bin/python

from blinkstick import blinkstick

for bstick in blinkstick.find_all():
print(“Found device:”)
print(" Manufacturer: " + bstick.get_manufacturer())
print(" Description: " + bstick.get_description())
print(" Serial: " + bstick.get_serial())
print(" Current Color: " + bstick.get_color(color_format=“hex”))
print(" Info Block 1: " + bstick.get_info_block1())
print(" Info Block 2: " + bstick.get_info_block2())
print(" Mode: " + str(bstick.get_mode()))

bstick = blinkstick.find_first()
print(bstick)
bstick.set_random_color()

And this is the error:

Found device:
Manufacturer: Agile Innovative Ltd
Description: BlinkStick Flex
Serial: BS022789-3.1
Current Color: #000000
Info Block 1: BlinkStick01
Info Block 2:
Mode: 2
<blinkstick.blinkstick.BlinkStick object at 0x0512F950>
Traceback (most recent call last):
File “C:\Users\SHa\eclipse-workspace\Blinkstick\blinkstick.py”, line 17, in
bstick.set_random_color()
File “C:\Users\SHa\eclipse-workspace\Blinkstick\blinkstick\blinkstick.py”, line 627, in set_random_color
self.set_color(name=“random”)
File “C:\Users\SHa\eclipse-workspace\Blinkstick\blinkstick\blinkstick.py”, line 341, in set_color
self._usb_ctrl_transfer(0x20, 0x9, report_id, 0, control_string)
File “C:\Users\SHa\eclipse-workspace\Blinkstick\blinkstick\blinkstick.py”, line 226, in _usb_ctrl_transfer
data = (c_ubyte * len(data_or_wLength))([c_ubyte(ord©) for c in data_or_wLength])
File “C:\Users\SHa\eclipse-workspace\Blinkstick\blinkstick\blinkstick.py”, line 226, in
data = (c_ubyte * len(data_or_wLength))(
[c_ubyte(ord©) for c in data_or_wLength])
TypeError: ord() expected string of length 1, but int found