Skip to content
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

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #1530

Closed
Buster-2002 opened this issue Apr 2, 2021 · 1 comment
Labels
bug Issues that report (apparent) bugs.

Comments

@Buster-2002
Copy link

Expected Behavior

Change gradient

Actual Behavior

This error being thrown:

Traceback (most recent call last):
  File "test.py", line 54, in <module>
    grad = color_gradient(moving_txt.size,p1=(0,2*h/3),
  File "C:\Users\User\AppData\Local\Programs\Python\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()

Steps to Reproduce the Problem

Copying the code used here (also set the height to an int, not float, to avoid a TypeError)

This error has been mentioned here, and was said to be fixed, but that doesn't appear to be the case anymore.

Specifications

  • Python Version: 3.8.5
  • Moviepy Version: 1.0.3
  • Platform Name: Windows 10 Pro
  • Platform Version: Version 2004 OS Build 19041.867
@Buster-2002 Buster-2002 added the bug Issues that report (apparent) bugs. label Apr 2, 2021
@tburrows13
Copy link
Collaborator

Sorry, it is fixed, but not in v1.0.3. You'll have to install a v2.0 pre-release with the pip --pre flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs.
Projects
None yet
Development

No branches or pull requests

2 participants