This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients alex, benjamin.peterson, nikratio, serhiy.storchaka, vajrasky
Date 2013-06-06.08:50:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370508659.4.0.703728641876.issue18116@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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'
History
Date User Action Args
2013-06-06 08:50:59serhiy.storchakasetrecipients: + serhiy.storchaka, benjamin.peterson, alex, nikratio, vajrasky
2013-06-06 08:50:59serhiy.storchakasetmessageid: <1370508659.4.0.703728641876.issue18116@psf.upfronthosting.co.za>
2013-06-06 08:50:59serhiy.storchakalinkissue18116 messages
2013-06-06 08:50:59serhiy.storchakacreate