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

Can't have a unicode filename in python bindings #13

Closed
alastair opened this issue Sep 18, 2013 · 1 comment
Closed

Can't have a unicode filename in python bindings #13

alastair opened this issue Sep 18, 2013 · 1 comment
Labels

Comments

@alastair
Copy link
Member

e.g.

audio = essentia.standard.MonoLoader(filename=fname)()

causes

/home/alastair/code/dunya/env/local/lib/python2.7/site-packages/essentia/standard.py in configure(self, **kwargs)
     56                 kwargs[name] = convertedVal
     57 
---> 58             self.__configure__(**kwargs)
     59 
     60         def compute(self, *args):

RuntimeError: Error while parsing parameters: String::fromPythonCopy: input not a PyString: <type 'unicode'>
@wackou
Copy link
Contributor

wackou commented Sep 22, 2013

this should now be fixed in master, thanks for the report! If you now pass a unicode string, it will convert it to UTF-8 automatically. If you want another encoding, it's better to do it from python directly, eg:

audio = essentia.standard.MonoLoader(filename=fname.encode('latin-1')()

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

No branches or pull requests

2 participants