# Python 3.7.2 error

**URL:** <https://forums.blinkstick.com/t/python-3-7-2-error/1151>\
**Category:** Uncategorized\
**Created:** [February 26, 2019, 7:28am UTC](https://forums.blinkstick.com/t/python-3-7-2-error/1151 "2019-02-26T07:28:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamidreza.shoja](https://forums.blinkstick.com/letter_avatar_proxy/v4/letter/h/f14d63/32.png) [@hamidreza.shoja](https://forums.blinkstick.com/u/hamidreza.shoja)\
**Post date:** [February 26, 2019, 7:28am UTC](https://forums.blinkstick.com/t/python-3-7-2-error/1151/1 "2019-02-26T07:28:41Z")

</div>

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(c)) 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(c)) for c in data\_or\_wLength])  
> TypeError: ord() expected string of length 1, but int found
