Serhiy Storchaka added the comment: >>> getpass.getpass('Password: ', sys.stdout) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/serhiy/py/cpython/Lib/getpass.py", line 72, in unix_getpass passwd = _raw_input(prompt, stream, input=input) File "/home/serhiy/py/cpython/Lib/getpass.py", line 146, in _raw_input stream.write(bytes(prompt, tty_encoding)) TypeError: must be str, not bytes
>>> getpass.getpass('Password: ', io.StringIO()) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/serhiy/py/cpython/Lib/getpass.py", line 72, in unix_getpass passwd = _raw_input(prompt, stream, input=input) File "/home/serhiy/py/cpython/Lib/getpass.py", line 146, in _raw_input stream.write(bytes(prompt, tty_encoding)) TypeError: string argument expected, got 'bytes' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18116> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com