ahodges9 / LedFx

LedFx is a network based LED effect controller with support for advanced real-time audio effects! LedFx can control multiple devices and works great with cheap ESP8266 nodes allowing for cost effectvice syncronized effects across your entire house!
MIT License
384 stars 91 forks source link

numpy.core errror #131

Open northerntaco opened 3 years ago

northerntaco commented 3 years ago

Hi I am getting this in the cmd prompt when LEDfx is running. Sometimes after this starts LEDfx will freeze, not sure if it is realted.

d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\gradient.py:94: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
  gradient = np.hstack(self._color_ease(len(ease_chunks[i]), *color_pairs[i]) for i in range(n_colors-1))
Exception in thread Thread-1:
Traceback (most recent call last):
  File "d:\anaconda\envs\ledfx\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "d:\anaconda\envs\ledfx\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\temporal.py", line 28, in thread_function
    sleepInterval = self.effect_loop()
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\strobe.py", line 22, in effect_loop
    self.pixels = np.full((self.pixel_count, 3), 255)
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\__init__.py", line 192, in pixels
    pixels = brightness_pixels(pixels, self._config['brightness'])
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\__init__.py", line 55, in brightness_pixels
    pixels *= brightness
numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('int32') with casting rule 'same_kind'

Exception in thread Thread-2:
Traceback (most recent call last):
  File "d:\anaconda\envs\ledfx\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "d:\anaconda\envs\ledfx\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\temporal.py", line 28, in thread_function
    sleepInterval = self.effect_loop()
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\strobe.py", line 22, in effect_loop
    self.pixels = np.full((self.pixel_count, 3), 255)
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\__init__.py", line 192, in pixels
    pixels = brightness_pixels(pixels, self._config['brightness'])
  File "d:\anaconda\envs\ledfx\lib\site-packages\ledfx\effects\__init__.py", line 55, in brightness_pixels
    pixels *= brightness
numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('int32') with casting rule 'same_kind'
bjornstevens commented 3 years ago

Did this happend after adding a Device in LedFx?

northerntaco commented 3 years ago

Did this happend after adding a Device in LedFx?

I have 5 devices added. The error pops up after an API call. I use API calls to change the preset at certain times during a song. This error seems to happen whenever I do an API call to change the preset. The api call is successful and the preset changes.

bjornstevens commented 3 years ago

Did this happend after adding a Device in LedFx?

I have 5 devices added. The error pops up after an API call. I use API calls to change the preset at certain times during a song. This error seems to happen whenever I do an API call to change the preset. The api call is successful and the preset changes.

Ah, i am not familiar with the API so i can't help you with that sorry. 🐤