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

TextClip.list('color') failed to return color list #371

Closed
liketemple opened this issue Dec 23, 2016 · 5 comments
Closed

TextClip.list('color') failed to return color list #371

liketemple opened this issue Dec 23, 2016 · 5 comments
Labels
bug Issues that report (apparent) bugs.

Comments

@liketemple
Copy link

liketemple commented Dec 23, 2016

>>> editor.TextClip.list('color')
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-3-c289bccc81e5>", line 1, in <module>
    editor.TextClip.list('color')
  File "/usr/local/lib/python3.5/site-packages/moviepy/video/VideoClip.py", line 1179, in list
    return [l.split(" ")[1] for l in lines[2:]]
  File "/usr/local/lib/python3.5/site-packages/moviepy/video/VideoClip.py", line 1179, in <listcomp>
    return [l.split(" ")[1] for l in lines[2:]]
TypeError: a bytes-like object is required, not 'str'

It seems the imageMagick return a binary str.

@dermusikman
Copy link
Contributor

I have this same issue with font:

>>> TextClip.list('font')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/moviepy/video/VideoClip.py", line 1177, in list
    return [l[8:] for l in lines if l.startswith("  Font:")]
  File "/usr/lib/python3.5/site-packages/moviepy/video/VideoClip.py", line 1177, in <listcomp>
    return [l[8:] for l in lines if l.startswith("  Font:")]
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

@tburrows13
Copy link
Collaborator

Is this related to http://stackoverflow.com/questions/42298261/no-available-fonts-in-moviepy? Running the exact same command.

@tburrows13 tburrows13 assigned tburrows13 and unassigned tburrows13 Feb 17, 2017
@tburrows13 tburrows13 added the bug Issues that report (apparent) bugs. label Feb 17, 2017
@dermusikman
Copy link
Contributor

I've never seen the function work, so I can't speak to the relevancy of the StackOverflow issue.

@keikoro
Copy link
Collaborator

keikoro commented Feb 19, 2017

There seems to be a(n untested) PR for the fonts-related issue. #306

@ghost
Copy link

ghost commented Feb 22, 2017

PR #306 has been merged, so closing this issue.

@ghost ghost closed this as completed Feb 22, 2017
This issue was closed.
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

4 participants