I have a Unicorn HAT for my Pi 2 which has been working great until today.
I did an apt-get upgrade to get the system up to date, and now every time I try to import unicornhat on Python, I get the following:
pi@unicornpi ~ $ sudo python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import unicornhat
Cant open device file /tmp/mailbox-2755: No such device or address
Cant open device file /tmp/mailbox-2755: No such device or address
Cant open device file /tmp/mailbox-2755: No such device or address
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/unicornhat.py", line 13, in <module>
ws2812.begin()
File "/usr/local/lib/python2.7/dist-packages/neopixel.py", line 107, in begin
raise RuntimeError('ws2811_init failed with code {0}'.format(resp))
RuntimeError: ws2811_init failed with code -1
>>>
Does anyone have any insights into what might be causing this? I’m assuming the upgrade it the issue, however I’ve also tried using a USB audio device recently but I don’t see why that would cause problems.
Thanks!
Edit: To clarify, I upgraded using sudo apt-get update and sudo apt-get upgrade
Thank you. I didn’t have a great deal set up on that installation so I’m wiping the SD card and doing a clean install of Raspbian 2015-05-05, so that should bring it back to life at least as a temporary solution, though no doubt it’ll break again the second I run update/upgrade.
Okay, I’ve verified that this is a problem with the latest Kernel, but it’s a little beyond my expertise so I’ve raised an issue upstream and will monitor how similar libraries cope with this problem. I made a few attempts to fix it, but didn’t get anywhere.
Hi, thanks for looking into this! I did a fresh install without upgrading as a temporary solution. I’ll try out that method when I get some time to mess around with it again. Hopefully it’s all good.
Hi gadgetoid. Faced the same issue after upgrade Raspberry kernel to 4.1.6-v7. You fix is working. Now i can enjoy my unicorn hat disco lights again. Many thanks!