not-matt / Systematic-LEDs

Audio reactive, all in one, room lighting for your computer.
MIT License
100 stars 35 forks source link

"Missing 2 required positional arguments: 'green' and 'blue'" #57

Open Leeonardoo opened 5 years ago

Leeonardoo commented 5 years ago

I'm trying to use this program in my RaspberryPi. The file devices.py was getting a error about the name neopixel that hasn't been defined, so I was able to "fix" it by adding: import neopixel after the line: for i in range(n_pixels):

But now it is giving everytime this error when I do "sudo python3 main.py"

main.py:929: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead y = np.fromstring(self.stream.read(self.frames_per_buffer, exception_on_overflow=False), dtype=np.int16) Traceback (most recent call last): File "main.py", line 2319, in microphone.startStream() File "main.py", line 931, in startStream self.callback_func(y) File "main.py", line 2237, in microphone_update board_manager.boards[board].show(outputs[board]) File "/home/pi/Systematic-LEDs/python/lib/devices.py", line 370, in show self.strip.setPixelColor(i, neopixel.Color(rgb)) TypeError: Color() missing 2 required positional arguments: 'green' and 'blue'

lpearl commented 5 years ago

Try changing in devices.py self.strip.setPixelColor(i, neopixel.Color(rgb[i])) to self.strip._led_data[i] = int(rgb[i])