Hello, I’m new to the forum and have a BlinkStick Square which I’m trying to use with Python on Linux and also a Raspberry Pi, but unfortunately I’m having the same problem on both devices.
I successfully control the BlinkStick on both devices via the command line, but when I try and control it via Python, I run into the errors below:
pi@RaspberryPi4Flirc:~/IO $ python2.7 blinkpython.py
Traceback (most recent call last): File "blinkpython.py", line 3, in <module> from blinkstick import blinkstick File "/home/pi/IO/blinkstick.py", line 1, in <module> from blinkstick import blinkstick
ImportError: cannot import name blinkstick
pi@RaspberryPi4Flirc:~/IO $ sudo python2.7 blinkpython.py
Traceback (most recent call last): File "blinkpython.py", line 3, in <module> from blinkstick import blinkstick File "/home/pi/SonosProject/IO/blinkstick.py", line 1, in <module> from blinkstick import blinkstick
ImportError: cannot import name blinkstick
pi@RaspberryPi4Flirc:~/IO $ python3 blinkpython.pyTraceback (most recent call last): File "blinkpython.py", line 3, in <module> from blinkstick import blinkstick File "/home/pi/SonosProject/IO/blinkstick.py", line 1, in <module> from blinkstick import blinkstick
ImportError: cannot import name 'blinkstick' from 'blinkstick' (/home/pi/IO/blinkstick.py)
The line of code which keeps throwing errors is simply this:
from blinkstick import blinkstick
I’ve installed everything as per here: https://www.blinkstick.com/help/raspberry-pi-integration and I believe I did it correctly. I’ve seen similar posts in the forum and followed those instructions as well, but the issue wasn’t exactly the same so it didn’t lead me anywhere but here.
Many thanks for any help