Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

@alexlouden
Copy link

@alexlouden alexlouden commented Dec 30, 2012

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.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants