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

av.open does not accept unicode name in Python 3 #82

Closed
svilendobrev opened this issue Mar 8, 2015 · 5 comments
Closed

av.open does not accept unicode name in Python 3 #82

svilendobrev opened this issue Mar 8, 2015 · 5 comments
Labels

Comments

@svilendobrev
Copy link

i've tried to build on python 3.4.
The setup.py needs fixing : raw_config inside library_config() needs decoding into unicode
i.e.

def library_config(name): 
    ..after getting raw_config..
            try: unicode    #py2 here
            except: #py3 here
                import sys
                raw_config = raw_config.decode( sys.stdout.encoding)
   ...

and that makes setup.py work.

Then, trying, av.open expects a bytes filename but gets unicode, and cython cannot autoconvert if not ascii. If filename is ascii, then all works (well i'm only reading audio). But If not ascii. no deal..

@mikeboers
Copy link
Member

Which revision are you using? I thought the decode part of this was addressed recently (in be03c9b).

@svilendobrev
Copy link
Author

on decode: i used whatever comes from pip, and that is not latest although version.num is same. now u're doing direct raw_config.decode, regardless of python 2 or 3, which may break something? dunno. if it works ok, doesnt matter.

@mikeboers
Copy link
Member

Ok. So I need to re-release the current master for the setup.py. The filename thing is another issue I need to look into.

@mikeboers mikeboers changed the title python 3 ? av.open does not accept unicode name in Python 3 Mar 30, 2015
@mikeboers mikeboers added the bug label Aug 18, 2015
@mozbugbox
Copy link

Patch to accept unicode filename in Python3: py3-filename-encoding.txt

@andreymal
Copy link

Non-English-speaking users (like me) can't use PyAV while this issue is not fixed :(

rodrhern pushed a commit to ZafeHome/PyAV that referenced this issue Jun 14, 2018
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

4 participants