Moviepy: Array ValueError when applying a Masking clip

Created on 2 Jun 2020  路  4Comments  路  Source: Zulko/moviepy

Hi :)
I'm having trouble applying a mask clip on a movie ...

I'm receiving the following error :

File "C:\Python38\lib\site-packages\moviepy\video\tools\drawing.py", line 147, in color_gradient
    if vector:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Running the same code present here in the Docs gives the same error

I tried to update MoviePy but all dependant packages are installed... Is it a dependancy issue ?
Is there an updated syntax to generate masks on movies...
Because It seems to me like a numpy error

bug

All 4 comments

Hello, this is a bug in MoviePy that was fixed in #1212. To fix it, you need to edit that line to instead read if vector is None:. The fix will be included in v2.0 of MoviePy. If you need the fixed version pip-installable now, I can upload a v2.0 beta to PyPI for you.

You already saved me me a lot of time by confirming the bug...
I'm already thankful and it would be great if you could publish the updated Beta.
Best regards

Sure! It is now available from pip by using pip install moviepy --pre --upgrade. You can see the full release notes here. Remember that future dev releases are likely to break backwards compatibility quite heavily (eg #1170).

Thank you again :)
Best regards

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wayn picture wayn  路  4Comments

cquintini picture cquintini  路  4Comments

buddhashrestha picture buddhashrestha  路  3Comments

feqwix picture feqwix  路  5Comments

Gicehajunior picture Gicehajunior  路  3Comments