Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.6 #28

Open
Neophytez opened this issue Mar 28, 2018 · 31 comments
Open

Python 3.6 #28

Neophytez opened this issue Mar 28, 2018 · 31 comments

Comments

@Neophytez
Copy link

I'm running this on RP3 - does this require python 3.6? Also having problem running/setting up this. Is there tutorial available (or is scottlawsonbc/audio-reactive-led-strip the only one)?

@tarthim
Copy link

tarthim commented Mar 29, 2018

Python 3.6 would be best for this fork, 2.X is not supported, scottlawsonbc/audio-reactive-led-strip does work on 2.X afaik. Only tutorial is curently scottlawsonbc's, although Google is of great help as well (WS2812B strips are pretty well documented). We can try and help you out here if you have any questions, though.

@Neophytez
Copy link
Author

Neophytez commented Mar 29, 2018

When running sudo python3 main.py:

Traceback (most recent call last):
File "main.py", line 1436, in
microphone.start_stream(microphone_update)
File "/home/pi/Systematic-LEDs/python/lib/microphone.py", line 34, in start_st ream
callback(y)
File "main.py", line 1352, in microphone_update
boards[board].show(outputs[board])
File "/home/pi/Systematic-LEDs/python/lib/devices.py", line 258, in show
self.strip._led_data[i] = rgb[i]
File "/usr/local/lib/python3.5/dist-packages/rpi_ws281x-1.0.0-py3.5-linux-armv 7l.egg/neopixel.py", line 49, in setitem
return ws.ws2811_led_set(self.channel, pos, value)
TypeError: in method 'ws2811_led_set', argument 3 of type 'uint32_t'

When running sudo python main.py:

File "main.py", line 1109
for key, label, ui_element, *opts in visualizers[self.board].dynamic_effects _config[effect]:
^
SyntaxError: invalid syntax

When running python3 main.py:

Can't open /dev/mem: Permission denied
Traceback (most recent call last):
File "main.py", line 1403, in
dma=config.settings["devices"][board]["configuration"]["LED_DMA"])
File "/home/pi/Systematic-LEDs/python/lib/devices.py", line 239, in init
self.strip.begin()
File "/usr/local/lib/python3.5/dist-packages/rpi_ws281x-1.0.0-py3.5-linux-armv7l.egg/neopixel.py", line 106, in begin
raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, message))
RuntimeError: ws2811_init failed with code -5 (mmap() failed)

I noticed that if I run scottlawsonbc with sudo python3 visualization.py:

Traceback (most recent call last):
File "visualization.py", line 354, in
led.update()
File "/home/pi/audio-reactive-led-strip/python/led.py", line 143, in update
_update_pi()
File "/home/pi/audio-reactive-led-strip/python/led.py", line 107, in _update_pi
strip._led_data[i] = rgb[i]
File "/usr/local/lib/python3.5/dist-packages/rpi_ws281x-1.0.0-py3.5-linux-armv7l.egg/neopixel.py", line 49, in setitem
return ws.ws2811_led_set(self.channel, pos, value)
TypeError: in method 'ws2811_led_set', argument 3 of type 'uint32_t'

It gives same error.

@csph
Copy link

csph commented Apr 9, 2018

On my RPi3 I got exactly the same errors :/
Does anybody know what to do?

@marcheffels
Copy link

TypeError: in method 'ws2811_led_set', argument 3 of type 'uint32_t'
I have the same error on my RPi Zero W

@not-matt
Copy link
Owner

Think this is fixed now, could you test in the new pull request? "minor fixes"

@Neophytez
Copy link
Author

Great! Will test in the following days and report back :)

@Neophytez
Copy link
Author

Neophytez commented Jun 28, 2018

sudo python3 main.py

Traceback (most recent call last):
  File "main.py", line 2014, in <module>
    microphone = Microphone(microphone_update)
  File "main.py", line 835, in __init__
    self.setDevice(self.default_device_id)
  File "main.py", line 846, in setDevice
    self.device_id = self.devices[device_id]["index"]
IndexError: list index out of range

@not-matt
Copy link
Owner

not-matt commented Jun 28, 2018 via email

@Neophytez
Copy link
Author

Installed missing modules, disabled GUI in config, executed sudo python3 main.py:

Traceback (most recent call last):
  File "main.py", line 884, in <module>
    class GUI(QMainWindow):
NameError: name 'QMainWindow' is not defined

Changed class GUI(QMainWindow): to class GUI():, executed command again:

Could not find settings.ini
No user colours found
No user gradients found
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_alsa.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Traceback (most recent call last):
  File "main.py", line 2014, in <module>
    microphone = Microphone(microphone_update)
  File "main.py", line 835, in __init__
    self.setDevice(self.default_device_id)
  File "main.py", line 846, in setDevice
    self.device_id = self.devices[device_id]["index"]
IndexError: list index out of range

@not-matt
Copy link
Owner

not-matt commented Jun 28, 2018 via email

@Neophytez
Copy link
Author

Neophytez commented Jun 28, 2018

If I put that back, following error occurs:

Traceback (most recent call last):
  File "main.py", line 884, in <module>
    class GUI(QMainWindow):
NameError: name 'QMainWindow' is not defined

I'm not using GUI, so that function is not important in my case (running RPI3 in CLI mode).
There is no settings.ini file in lib folder.

@not-matt
Copy link
Owner

not-matt commented Jun 28, 2018 via email

@Neophytez
Copy link
Author

The following error occurs, when I disable GUI in config.py: 'USE_GUI': False

Traceback (most recent call last):
  File "main.py", line 884, in <module>
    class GUI(QMainWindow):
NameError: name 'QMainWindow' is not defined

If I leave it at True:

Could not find settings.ini
No user colours found
No user gradients found
QXcbConnection: Could not connect to display
Aborted

So is it possible to use with RP3 using only CLI?

@not-matt
Copy link
Owner

not-matt commented Jun 28, 2018 via email

@Neophytez
Copy link
Author

Yeah, installed it without any errors. Well I don't have any display connected to RP3, maybe that's a problem?

@not-matt
Copy link
Owner

not-matt commented Jun 28, 2018 via email

@ranzhe
Copy link

ranzhe commented Aug 2, 2018

Getting almost the same error as @Neophytez:

python ./main.py
Could not find settings.ini
No user colours found
No user gradients found
Traceback (most recent call last):
  File "main.py", line 2013, in <module>
    microphone = Microphone(microphone_update)
  File "main.py", line 834, in __init__
    self.setDevice(self.default_device_id)
  File "main.py", line 845, in setDevice
    self.device_id = self.devices[device_id]["index"]
IndexError: list index out of range

Steps to reproduce:

  1. Clone the repo
  2. Try to run main.py

Additional information:

  • OS: macOS X 10.11
  • Python version: 3.7.0
  • PyQt5 version: 5.11.2

@surajkhan
Copy link

@not-matt I am getting the same error as that of @ranzhe , your project does not work on macOS. Th e original project works flawlessly. I think there is an issue with the microphone device list from system.

@ranzhe
Copy link

ranzhe commented Aug 7, 2018

@surajkhan finally i was able to manage my issue and make it running on my macOS.
I'll attach my lib/config.py file (You should update ip address with address of your esp8266).

Also i had buffer overflow crashes, had to edit line 19 in lib/microphone.py to fix that:
y = np.fromstring(stream.read(frames_per_buffer, exception_on_overflow=False), dtype=np.int16)

config.zip

@surajkhan
Copy link

@ranzhe My config.py file is alright. However I don't see any file called microphone.py inside the lib folder. So I might be missing something. It seems someone deleted microphone.py from the project directory?

@surajkhan
Copy link

@ranzhe even after updating its starting new errors, can you send me your entire project dump?

@M1nCh3
Copy link

M1nCh3 commented Nov 21, 2018

when im running python main.py

Could not find settings.ini
No user colours found
No user gradients found

am i missing something?

@not-matt
Copy link
Owner

not-matt commented Nov 21, 2018 via email

@M1nCh3
Copy link

M1nCh3 commented Nov 21, 2018

and what should i do about it?
when im in colour control tab it suddently not responding. what should i do?
this is new for me working with nodeMCU.
please give me tutorial link to fix this please, or just tell me what to do to fix.
thankyou for your fast respond

@M1nCh3
Copy link

M1nCh3 commented Nov 21, 2018

im already follow guide from your youtube chanel. but it happen like this.

@surajkhanfau
Copy link

@M1nCh3 When I faced the issue, I just check the older commits in the config.py file in this git repo. That should help you what to fill where if you want to solve the issue.

@M1nCh3
Copy link

M1nCh3 commented Nov 21, 2018

which commits that link to my problem?

@surajkhanfau
Copy link

surajkhanfau commented Nov 21, 2018

@M1nCh3 in the config.py file you have a section which defines the color gradients and the error you are getting in the line 37 where it defines the colormanager. In the same file look for similar definitions after the lines 277. Just copy and paste them to above in the color manager section. This should suppress the error. But I stopped using this project because it was throwing several errors and wasn't working properly with my configuration. So I would also have a look on the dirty-leds project by vrondakis!

In addition I am unaware of the new changes pushed by the author. Hence you may try fixing the config.py and may be update us with your results.

@M1nCh3
Copy link

M1nCh3 commented Nov 25, 2018

this is what i get

(RGB) C:\systematic\python>python main.py
No user colours found
No user gradients found
Traceback (most recent call last):
File "main.py", line 2046, in
microphone = Microphone(microphone_update)
File "main.py", line 842, in init
device_info = py_audio.get_device_info_by_host_api_device_index(0,i)
File "C:\Users\Wirabuana\AppData\Local\conda\conda\envs\RGB\lib\site-packages\pyaudio.py", line 852, in get_device_info_by_host_api_device_index
host_api_device_index)
OSError: [Errno -9996] Invalid device

please tell me what wrong and what i should change in main or config.
thankyou

@FabioEnne
Copy link

Hello! i'm trying to use it on a Wedmos D1 R1 mini..anyone got any idea ho to set the RX pin properly? the GUI starts just fine.

@plabonhasan
Copy link

problem

(RGB) C:\systematic\python>python main.py
No user colours found
No user gradients found

dear i am not professional, how can i easy way to solved it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests