vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

imageio: fps no longer supported, use duration instead

Open xtfocus opened this issue 1 year ago • 2 comments

https://github.com/polakowo/vectorbt/blob/8c040429ac65d43ea431dc2789bf4787dd103533/vectorbt/utils/image_.py#LL74C1-L74C72

Clearly vbt.save_animation is still using fps as argument in imageio.get_writer, which doesn't support fps anymore, One quick fix should be changing this line to

with imageio.get_writer(fname, duration=fps // 5, **writer_kwargs) as writer:

xtfocus avatar Jun 04 '23 10:06 xtfocus

Thanks. Isn't duration in milliseconds? So it would become duration=1000 / fps.

polakowo avatar Jun 04 '23 11:06 polakowo

Fixed in 0.25.4.

polakowo avatar Jun 05 '23 13:06 polakowo