-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix AttributeError: 'NoneType' object has no attribute 'stdout'
for all versions of Python
#1185
Conversation
… all versions of Python (#1185) Release v1.0.3
Hello @SimoneMender. I'm sorry to hear that you are still experiencing problems. Would you be able to post the complete error callback, a small complete piece of code that demonstrates the error, and (if possible) a mp4 file that fails when used as input? These 3 things should make it very easy for someone to find out where the error is and fix it. |
@SimoneMender sorry, your comment appear twice on my screen, so I deleted the second one. Now the first one has disappeared as well, so that might have been my fault. Here's your original message:
|
@tburrows13 Thanks for your quick answer! Here is the complete error message:
While creating an example, I found another curiosity. When I call my function with:
I'll create the error above. When I change the start and stop time of my function to
mp4 file is produced without any problems. As the input file "medicaltraining.mp4", is longer than 23 s I can't understand this. |
Ok, I've investigated and found a fix. Your problem is that you are closing the The solution is to indent the following 2 lines:
so that they are inside the The reason that it works when |
That solved my problem! Thank you very much! |
This supersedes #1059, and includes the test from it, but solves the problem in a slightly different way, as suggested in #938. However, without the
self.proc.wait()
line, the change made it incompatible with Python <3.7 on Windows, which is why the fix has taken so long. With this PR, the dealings withsubprocess.Popen
should be consistent between VideoFileClips and AudioFileClips.I could see an argument for implementing #1059 for both Video and Audio, but because this fix is intended for the v1.0 branch, I didn't want to change the recommended way of closing/deleting clips.
I intend to release this very soon as a v1.0.3, and then merge it into the v2 branch.