You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the most up to date Pillow (3.0.0), using VideoFileClips resize method fails with the following traceback (only relevant bit shown):
File "/home/nasfarley88/thebslparlour/bslparloursite/helper/gif.py", line 38, in process_video
video_file = video_file.resize(width=max_width)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/video/fx/resize.py", line 144, in resize
newclip = clip.fl_image(fl)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/video/VideoClip.py", line 514, in fl_image
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/Clip.py", line 136, in fl
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "<decorator-gen-57>", line 2, in set_make_frame
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/decorators.py", line 14, in outplace
f(newclip, *a, **k)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/video/VideoClip.py", line 654, in set_make_frame
self.size = self.get_frame(0).shape[:2][::-1]
File "<decorator-gen-14>", line 2, in get_frame
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/Clip.py", line 95, in get_frame
return self.make_frame(t)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/Clip.py", line 136, in <lambda>
newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/video/VideoClip.py", line 514, in <lambda>
return self.fl(lambda gf, t: image_func(gf(t)), apply_to)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/video/fx/resize.py", line 142, in <lambda>
fl = lambda pic: resizer(pic.astype('uint8'), newsize)
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/moviepy/video/fx/resize.py", line 32, in resizer
arr = np.fromstring(resized_pil.tostring(), dtype='uint8')
File "/home/nasfarley88/thebslparlour/env/lib/python3.4/site-packages/PIL/Image.py", line 686, in tostring
"Please call tobytes() instead.")
Exception: tostring() has been removed. Please call tobytes() instead.
The text was updated successfully, but these errors were encountered:
Take a look at the latest build. The relevant lines are comment out. If you follow the trace this error occurs at line 32 in resize.py. You can change that to use tobytes() or update the file to the latest file in master. This solved the problem related to the resizing issue I had.
Changing resize.py works for now without issue. I'll wait until the next release to upgrade my moviepy to keep my pip environment clean but I'm sure it'll work.
Using the most up to date Pillow (3.0.0), using
VideoFileClip
sresize
method fails with the following traceback (only relevant bit shown):The text was updated successfully, but these errors were encountered: