# Blinkstick Nano Python 3.7

**URL:** <https://forums.blinkstick.com/t/blinkstick-nano-python-3-7/1237>\
**Category:** Support\
**Created:** [July 30, 2019, 6:14pm UTC](https://forums.blinkstick.com/t/blinkstick-nano-python-3-7/1237 "2019-07-30T18:14:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathias.denzin](https://forums.blinkstick.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@mathias.denzin](https://forums.blinkstick.com/u/mathias.denzin)\
**Post date:** [July 30, 2019, 6:14pm UTC](https://forums.blinkstick.com/t/blinkstick-nano-python-3-7/1237/1 "2019-07-30T18:14:45Z")

</div>

Hi, I started to play with the Blinkstick Nano in Python. I wonder if the API is not compatible to Python3.x, because I can’t use most of the methods.

This is my code:

```
from blinkstick import blinkstick
    for bs in blinkstick.find_all():
bs.set_random_color()

```

And this is the error I get:

> Traceback (most recent call last):  
> File “.\test.py”, line 4, in   
> bs.set\_random\_color()  
> File “C:\Users\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\blinkstick\blinkstick.py”, line 627, in set\_random\_color  
> self.set\_color(name=“random”)  
> File “C:\Users\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\blinkstick\blinkstick.py”, line 341, in set\_color  
> self.\_usb\_ctrl\_transfer(0x20, 0x9, report\_id, 0, control\_string)  
> File “C:\Users\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\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\MDENZIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\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

Any idea?
