You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you set a message to be rendered using one of the animations, then stop it and change to a different message which is shorter than the original message but still needs animating, if the current index is longer than the new message an exception is thrown
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File ".../lib/python3.9/site-packages/halo/halo.py", line 421, in render
self._render_frame()
File ".../lib/python3.9/site-packages/halo/halo.py", line 407, in _render_frame
frame = self.frame()
File ".../lib/python3.9/site-packages/halo/halo.py", line 441, in frame
text_frame = self.text_frame()
File ".../lib/python3.9/site-packages/halo/halo.py", line 464, in text_frame
frame = frames[self._text_index]
IndexError: list index out of range
Expected behaviour
Reset _text_index to the start of the new message.
Description
If you set a message to be rendered using one of the animations, then stop it and change to a different message which is shorter than the original message but still needs animating, if the current index is longer than the new message an exception is thrown
System settings
pip freeze
output:Error
Expected behaviour
Reset
_text_index
to the start of the new message.Steps to recreate
(not 100% reliable, can take a few tries to reproduce)
The text was updated successfully, but these errors were encountered: