Getting "OSError: [WinError 6] The handle is invalid" in VideoFileClip function

I solved the issue by running the following commands after reading the video.

video_clip.reader.close()
video_clip.audio.reader.close_proc()

See https://github.com/Zulko/moviepy/issues/73 and https://github.com/Zulko/moviepy/issues/164.


Somehow python.exe was failing and because of that internal function like VideoFileClip was giving error in jupyter-notebook.

Then I closed everything and restarted back and voila, error was gone and it's working fine now.