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

Led_effect python looping #217

Open
Akcidolsbf opened this issue Aug 8, 2024 · 1 comment
Open

Led_effect python looping #217

Akcidolsbf opened this issue Aug 8, 2024 · 1 comment

Comments

@Akcidolsbf
Copy link

Hello,

since last update i got random error and looping with python 3.1, my system is full up to date:

Unhandled exception during run
Traceback (most recent call last):
File "/home/pi/klipper/klippy/klippy.py", line 176, in run
self.reactor.run()
File "/home/pi/klipper/klippy/reactor.py", line 292, in run
g_next.switch()
File "/home/pi/klipper/klippy/reactor.py", line 340, in _dispatch_loop
timeout = self._check_timers(eventtime, busy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/reactor.py", line 158, in _check_timers
t.waketime = waketime = t.callback(eventtime)
^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/led_effect.py", line 205, in _getFrames
frames = [(effect, effect.getFrame(eventtime)) for effect in self.effects]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/led_effect.py", line 205, in
frames = [(effect, effect.getFrame(eventtime)) for effect in self.effects]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/led_effect.py", line 485, in getFrame
layerFrame = layer.nextFrame(eventtime)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/klipper/klippy/extras/led_effect.py", line 729, in nextFrame
r = randint(0, self.colorCount)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/random.py", line 362, in randint
return self.randrange(a, b+1)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/random.py", line 344, in randrange
return istart + self._randbelow(width)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/random.py", line 239, in _randbelow_with_getrandbits
k = n.bit_length() # don't use (n-1) here because n can be 1
^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded while calling a Python object
Transition to shutdown state: Unhandled exception during run
Dumping gcode input 0 blocks

@julianschill
Copy link
Owner

Duplicate of #94

@julianschill julianschill marked this as a duplicate of #94 Sep 29, 2024
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

2 participants