audio-reactive-led-strip icon indicating copy to clipboard operation
audio-reactive-led-strip copied to clipboard

TypeError: argument 3 of type 'unit32_t'

Open thakur785 opened this issue 7 years ago • 4 comments

I get the following error i run the visualization.py on the raspberry pi: root@xyz:/home/pi/dancyPi-audio-reactive-led-master/python# python visualization.py energy Traceback (most recent call last): File "visualization.py", line 368, in led.update() File "/home/pi/dancyPi-audio-reactive-led-master/python/led.py", line 143, in update _update_pi() File "/home/pi/dancyPi-audio-reactive-led-master/python/led.py", line 107, in _update_pi strip._led_data[i] = rgb[i] File "build/bdist.linux-armv6l/egg/neopixel.py", line 49, in setitem TypeError: in method 'ws2811_led_set', argument 3 of type 'uint32_t'

I am able to run the rpi_ws281x examples and they work just fine....

thakur785 avatar Oct 27 '18 07:10 thakur785

change line 108: "strip._led_data[i] = rgb[i]" to "strip._led_data[i] = int(rgb[i])" it is passing the numpy int type instead I think

bfjia avatar Oct 29 '18 02:10 bfjia

Thanks a lot for your response, now that error is gone: but I still get some error as shown below. The audio play well from the usb audio device and led.py test works fine, but running visualization.py on the raspberry pi gives below error

note: I have changed the file /etc/asound.conf and /usr/share/alsa/alsa.conf: as described here: https://github.com/naztronaut/dancyPi-audio-reactive-led

Any help would be highly appreciated :)

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.1:CARD=1' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM front ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.1:CARD=1' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround40 ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.1:CARD=1' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround41 ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.1:CARD=1' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround50 ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.1:CARD=1' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround51 ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.1:CARD=1' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM surround71 ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.1:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM iec958 ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.1:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.1:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM spdif ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started

thakur785 avatar Nov 03 '18 11:11 thakur785

Sounds like this might be an issue with python interfacing with your microphone: https://github.com/Kitt-AI/snowboy/issues/45

joeybab3 avatar Feb 11 '19 06:02 joeybab3

has this issue been resolved??? and added to the master?? It's still an issue...

brisbaneroboticsclub avatar May 14 '20 13:05 brisbaneroboticsclub