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

global name 'colorGradient' is not defined #141

Closed
boussouira opened this issue Mar 7, 2015 · 2 comments
Closed

global name 'colorGradient' is not defined #141

boussouira opened this issue Mar 7, 2015 · 2 comments

Comments

@boussouira
Copy link

Hi,

When i run this code:

    grad = moviepy.video.tools.drawing.color_gradient(wasted_clip.size,p1=(0,h/2),
                    p2=(0,h),col1=0.0,col2=1.0,offset=0.7,shape='bilinear')

i get this runtime exception:

Traceback (most recent call last):                                                                                               
  File "./movie_testing.py", line 35, in <module>                                                                                       
    p2=(0,h),col1=0.0,col2=1.0,offset=0.7,shape='bilinear')                                                                      
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/tools/drawing.py", line 126, in color_gradient                      
    for v in [vector,-vector]]                                                                                                   
NameError: global name 'colorGradient' is not defined

whithout shape= arguments, it work.
moviepy installed with pip

@Zulko
Copy link
Owner

Zulko commented Mar 8, 2015

Thanks for catching that, I'll correct at the next commit.

@ghost
Copy link

ghost commented Feb 22, 2017

this example seems to work for python2, but I get an error for python3

import moviepy
from moviepy.editor import *

clip=VideoFileClip("media/knights.mp4").subclip(50,60)
w,h = clip.size
grad = moviepy.video.tools.drawing.color_gradient(clip.size,p1=(0,h/2),
                    p2=(0,h),col1=0.0,col2=1.0,offset=0.7,shape='bilinear')

The error is:

Fatal Python error: PyImport_GetModuleDict: no module dictionary!

Current thread 0x00007fe7fab8b700 (most recent call first):
  File "/usr/local/lib/python3.5/dist-packages/moviepy-0.2.2.13-py3.5.egg/moviepy/video/io/VideoFileClip.py", line 91 in __del__
Aborted (core dumped)

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants