-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix to work with python3 #162
Conversation
Hey there, can you explain the changes in mplfig_to_npimage ? |
To port moviepy's code to python 3, a difference is that strings are now represented as unicode and data as bytes while this was different (and sometimes problematic) in python 2: https://docs.python.org/3.3/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit This was already implemented in matplotlib, trying to make this backportable with python 2.7, see for instance in fact, there is no change to the API, but the correct backend has to be called. basically, what I am doing here is to call for the correct backend (Agg) before calling the same functions and return a numpy array. hope it is a bit clearer, I am still learning my way to help contribute to the libraries that I use. |
I still have problems rendering movies in a notebook using python 3 - see https://laurentperrinet.github.io/sciblog/posts/2015-04-26-moviepy-and-python3.html - do you have the same problem? |
I didn't have time to look into this (im still on Python 2 in my notebooks), now its unclear, does the commit actually solves the problem ? |
Yes the commit solves the problem in py3k - and should be back-portable with python 2.7 and higher. |
Hi everyone, I would like to add that I have encountered the same problem than @Meduz. Would it be possible to accept the PR so as to fix this problem with Python 3? Best regards, Florian |
Any progress on this? |
Sorry for being slow. Too bad moviepy doesn't have a test suite. |
tries to solve #160
tested with python 2.7.9 and 3.4.3
(sorry my editor automatically "cleaned" spaces - I fixed that)