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

FunctionAnimator tries to take length of iterator #1769

Closed
stefanv opened this issue Feb 20, 2013 · 0 comments · Fixed by #2634
Closed

FunctionAnimator tries to take length of iterator #1769

stefanv opened this issue Feb 20, 2013 · 0 comments · Fixed by #2634
Assignees

Comments

@stefanv
Copy link
Contributor

stefanv commented Feb 20, 2013

https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/animation.py#L981

FunctionAnimator allows an iterator as the frames parameter, but then tries to take its length. This, e.g., does not work on iter(range(10)) or itertools.count().

@ghost ghost assigned tacaswell Nov 29, 2013
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Nov 30, 2013
If an iterable is passed into `FuncAnimation` check if it has
`__len__` before trying to take it's length

closes matplotlib#1769
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants