Skip to content

Video editing with Python

Don't call self.close() in __del__, fixes #1994 (#1995)

Tobias Borabc8d1a831d2d
diff --git a/moviepy/Clip.py b/moviepy/Clip.py
index 71c13f64..5c2d88b2 100644
--- a/moviepy/Clip.py
+++ b/moviepy/Clip.py
@@ -635,7 +635,10 @@ class Clip:
return self.get_frame(key)
def __del__(self):
- self.close()
+ # WARNING: as stated in close() above, if we call close, it closes clips even
+ # if shallow copies are still in used, leading to some bugs: https://github.com/Zulko/moviepy/issues/1994
+ # so don't call self.close() here, rather do it manually in the code.
+ pass
def __add__(self, other):
# concatenate. implemented in specialized classes