-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
AttributeError: 'NoneType' object has no attribute 'stdout' #1994
Comments
So after a bit of investigation, it seems like the issue occurs only with some kinds of video (here a video exported via kdenlive), more precisely when moviepy tries to deal with the audio. The reason is that the file descriptor of moviepy/moviepy/audio/io/AudioFileClip.py Lines 79 to 83 in b5bb086
that destroys the proc to ffmpeg. Commenting these lines actually solve the problem, but this is a dirty solution since the proc will never be closed. Now, why is it closed? A traceback gives:
So it seems like at some point the clip is destroyed automatically by the garbage collector, that calls: Lines 637 to 638 in b5bb086
but this arrives before the moviepy/moviepy/audio/io/AudioFileClip.py Line 76 in b5bb086
So proc does not exists when it is called later. I guess the garbage collector is not clever enough to determine that a function copy is still in use… This seems to be a well known issue however: Lines 541 to 551 in b5bb086
but I have no idea what is the clean way to solve it. Actually this line sayes that @keikoro might have an idea? |
Expected Behavior
I expect this code to work:
Actual Behavior
I get this error on master:
Steps to Reproduce the Problem
First, get the latest version on master. If you want to get the same environment as mine and you have nix, you can just run:
to enter a shell with the expected dependencies.
Then, write in a file
test.py
:create the 2 files using these two files (hopefully github will not alter them):
classe_inversee.mp4
:classe_inversee.mp4
and run
You should observe:
Specifications
The text was updated successfully, but these errors were encountered: