Skip to content

Matplotlib Animation.save() hangs from stalled pipe #2568

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

Closed
snaphat opened this issue Nov 2, 2013 · 5 comments
Closed

Matplotlib Animation.save() hangs from stalled pipe #2568

snaphat opened this issue Nov 2, 2013 · 5 comments
Milestone

Comments

@snaphat
Copy link

snaphat commented Nov 2, 2013

This is to report that an early fix for a bug doesn't actually work:
b836275

FFmpeg pushes status information about frames/fps/time/bitrate/etc to stderr regardless of the log level so the buffer is going to eventually fill and stall the pipe when enough information is pushed.

There are three possible solutions I see:

  1. Redirecting stderr to a file and read that if an exception is raised.

  2. Disabling blocking on the non-redirected file descriptor and reading/buffering the stderr into memory manually similar to the following:
    http://chase-seibert.github.io/blog/2012/11/16/python-subprocess-asynchronous-read-stdout.html

  3. Don't redirect stderr for printing on error.

@snaphat
Copy link
Author

snaphat commented Nov 4, 2013

The same issue occurs when using Mencoder as the backend because it also outputs to stdout/stderr...

@tacaswell
Copy link
Member

@snaphat Could you possibly put together a PR to do this?

@efiring
Copy link
Member

efiring commented May 11, 2014

Option 2 seems unnecessarily complicated for our purposes; option 3 is simplest. Would it do any harm in real use cases?

@tacaswell
Copy link
Member

As this only happens on 3.2 (which I think we should drop support for altogether...IPython has) punting to 1.4.x

@tacaswell tacaswell modified the milestones: v1.4.x, v1.4.0 Jun 29, 2014
@tacaswell tacaswell modified the milestones: 1.5.0, v1.4.x Feb 7, 2015
@tacaswell tacaswell added the Py3k label Feb 7, 2015
@tacaswell tacaswell modified the milestones: v1.4.x, 1.5.0 Feb 7, 2015
@tacaswell
Copy link
Member

According to my last comment, this is only an issue for 3.2 that we no longer 'officially' support, closing.

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

5 participants