getpass.getpass() prompt on windows expects char not unicode #806

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@alexlouden
Contributor

Traceback:

File "C:\Python27\Lib\site-packages\fabric\network.py", line 488, in prompt_for_password
new_password = getpass.getpass(password_prompt, stream)
File "C:\Python27\Lib\getpass.py", line 95, in win_getpass
msvcrt.putch(c)
TypeError: must be char, not unicode

I've just converted the prompt text to ASCII with password_prompt.encode('ascii','ignore'), but perhaps there's a nicer solution. Haven't tested on Linux.

@alexlouden alexlouden Fix for TypeError - convert prompt from unicode to ascii
File "G:\Work\Hpflsk\lib\site-packages\fabric\network.py", line 488, in
prompt_for_password
new_password = getpass.getpass(password_prompt, stream)
File "C:\Python27\Lib\getpass.py", line 95, in win_getpass
msvcrt.putch(c)
TypeError: must be char, not unicode
6797e0c
@bitprophet bitprophet added a commit that referenced this pull request Jan 27, 2013
@bitprophet bitprophet Changelog, refactor re: #806
Fixes #806
39620d0
@bitprophet bitprophet added a commit that closed this pull request Jan 27, 2013
@bitprophet bitprophet Changelog, refactor re: #806
Fixes #806
39620d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment