paul j3 added the comment:

'invalid bytes value' is the error message generated by 'argparse'.  The 
underlying error (for a string like 'xxx') is:

    print(bytes(sys.argv[1]))
    TypeError: string argument without an encoding

You could use 'bytes' if you somehow supply the encoding, as in:

    def mybytes(astr):
       return bytes(astr, 'utf-8')

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21416>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to