On Jan 26, 2016, at 01:12 AM, Ben Hutchings wrote:

>That's not the problem at all.  Read the error message again.  Read the
>source line it points to.  Now look at where rv comes from:
>
>>>> import subprocess
>>>> rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,  
>...                       stderr=subprocess.PIPE).communicate()[0]
>>>> type(rv)  
><class 'bytes'>

For Python 3, try adding `universal_newlines=True` to any subprocess call.
You'll get back a str.

Cheers,
-Barry

Attachment: pgpDd84p51hjY.pgp
Description: OpenPGP digital signature

Reply via email to