"Info" errors with blinkstick v1.1, Ubuntu 14

I bought a couple of these from Adafruit for Christmas presents and tonight I put one together to see how hard it would be.

After installing the Linux package I was able to perform these operations successfully:

blinkstick --pulse red (green, white, …)
run the 'random color" example from github.
run the “turn it off” example.

However, the blinkstick --info command fails:

frank@baloo:~/Projects/BlinkStick$ blinkstick --info
Found device:
Traceback (most recent call last):
  File "/usr/local/bin/blinkstick", line 308, in <module>
    sys.exit(main())
  File "/usr/local/bin/blinkstick", line 254, in main
    print_info(stick)
  File "/usr/local/bin/blinkstick", line 78, in print_info
    print("    Manufacturer:  {0}".format(stick.get_manufacturer()))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0409' in position 0: ordinal not in range(128)

as does the “information” example:

frank@baloo:~/Projects/BlinkStick$ python info.py 
Found device:
    Manufacturer:  Љ
    Description:   Љ
    Serial:        Љ
    Current Color: #000000
    Info Block 1:  
    Info Block 2:  

From lsusb, this appears to be the BlinkStick device:

Bus 001 Device 007: ID 20a0:41e5 Clay Logic 

This may or may not be relevant:

frank@baloo:~/Projects/BlinkStick$ python -V
Python 2.7.6

Any suggestions you can make will be appreciated.

Thank you.

Could you please paste the output of this command:

pip list

Hi.

Thanks for the reply.

Certainly.

frank@baloo:~/Projects/BlinkStick$ bash

frank@baloo:~/Projects/BlinkStick$ pip list

adium-theme-ubuntu (0.3.4)
apt-xapian-index (0.45)
argparse (1.2.1)
BlinkStick (1.1.5)
chardet (2.0.1)
classicmenu-indicator (0.09-1)
colorama (0.2.5)
command-not-found (0.3)
debtagshw (0.1)
defer (1.0.6)
dirspec (13.10)
duplicity (0.6.23)
html5lib (0.999)
httplib2 (0.8)
lockfile (0.8)
lxml (3.3.3)
oauthlib (0.6.1)
oneconf (0.3.7)
PAM (0.4.2)
pexpect (3.1)
Pillow (2.3.0)
pip (1.5.4)
piston-mini-client (0.7.5)
pycrypto (2.6.1)
pycups (1.9.66)
pycurl (7.19.3)
pygobject (3.12.0)
PyGreSQL (4.0)
pyOpenSSL (0.13)
pyserial (2.6)
pysmbc (1.0.14.1)
python-apt (0.9.3.5)
python-debian (0.1.21-nmu2ubuntu2)
pyusb (1.0.0b2)
pyxdg (0.25)
reportlab (3.0)
requests (2.2.1)
sessioninstaller (0.0.0)
setuptools (3.3)
six (1.5.2)
software-center-aptd-plugins (0.0.0)
system-service (0.1.6)
Twisted-Core (13.2.0)
Twisted-Web (13.2.0)
unity-lens-photos (1.0)
urllib3 (1.7.1)
wsgiref (0.1.2)
xdiagnose (3.6.3build2)
zope.interface (4.0.5)
frank@baloo:~/Projects/BlinkStick$ pip list|grep usb
pyusb (1.0.0b2)

Hope there’s A Clue in there somwhere. I’ll add this:

frank@baloo:~/Projects/BlinkStick$ uname -a
Linux baloo 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Can you please try to downgrade PyUSB according to this:

… and let me know if it sorts your issue?

No problem.

frank@baloo:~/Projects/BlinkStick$ sudo pip uninstall -y pyusb
[sudo] password for frank: 
Uninstalling pyusb:
  Successfully uninstalled pyusb
frank@baloo:~/Projects/BlinkStick$ sudo pip install pyusb==1.0.0b1
Downloading/unpacking pyusb==1.0.0b1
  Downloading pyusb-1.0.0b1.tar.gz (44kB): 44kB downloaded
  Running setup.py (path:/tmp/pip_build_root/pyusb/setup.py) egg_info for package pyusb
    
Installing collected packages: pyusb
  Running setup.py install for pyusb
    
Successfully installed pyusb
Cleaning up...
frank@baloo:~/Projects/BlinkStick$ blinkstick --info
Found device:
    Manufacturer:  Agile Innovative Ltd
    Description:   BlinkStick
    Serial:        BS001341-1.4
    Current Color: #000000
    Mode:          -1
    Info Block 1:  
    Info Block 2:  

Um… literally… no problem no more. Fixed. De-bugged.

My apologies – I did see a pointer to that item when I installed the BlinkStick software but misunderstood it – I expected to see some sort of truly obscure error message if it were present. ( Though, some to think of it, “codec can’t encode character” is rather obscure. )

Thank you for pointing me at the fix, especially since you had to do it on a Monday.

Merry… Christmas? Boxing Day? Anyway, have a good holiday. My sister and nephew will be very pleased. ( Now to build a couple of Pretty Enclosures… )

Glad to hear it works for you! :smile:

I really need to bind blinkstick pip package to pyusb b1 as it’s causing so many problems…

I wish you great holidays too and please LMK if you need anything else. I really hope your sister and nephew loves BlinkStick!