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
Passing repeat_delay=1 to FuncAnimation on the last line prevents the error. It looks like having repeat_delay=0 sets TimerTornado.interval to 0, but tornado.ioloop.PeriodicCallback requires a positive value for interval.
Actual outcome
This error appears in the console when the animation crashes.
ERROR:tornado.application:Exception in callback <bound method TimerBase._on_timer of <matplotlib.backends.backend_webagg_core.TimerTornado object at 0x7f8627585610>>
Traceback (most recent call last):
File ".../site-packages/tornado/ioloop.py", line 907, in _run
return self.callback()
File ".../site-packages/matplotlib/backend_bases.py", line 1194, in _on_timer
ret = func(*args, **kwargs)
File ".../site-packages/matplotlib/animation.py", line 1432, in _step
self.event_source.interval = self._repeat_delay
File ".../site-packages/matplotlib/backend_bases.py", line 1135, in interval
self._timer_set_interval()
File ".../site-packages/matplotlib/backends/backend_webagg_core.py", line 537, in _timer_set_interval
self._timer_start()
File ".../site-packages/matplotlib/backends/backend_webagg_core.py", line 518, in _timer_start
self._timer = tornado.ioloop.PeriodicCallback(
File ".../site-packages/tornado/ioloop.py", line 873, in __init__
raise ValueError("Periodic callback must have a positive callback_time")
ValueError: Periodic callback must have a positive callback_time
Activity
QuLogic commentedon Sep 26, 2020
Huh, it's a bit weird that
repeat_delaydoesn't default tointerval, so that there's no difference between individual steps and the loop around.Fix setting 0-timeout timer with Tornado.
johnomotani commentedon Sep 27, 2020
Thanks for the quick fix @QuLogic!