On Windows, command line client login credential prompt fails (python 2.7)

Description

This occurs right after I enter my username:

Environment

OS: Windows 10 (64-bit)
Python 2.7.13

Activity

Show:
Ziming Dong
May 9, 2017, 10:53 PM

The problem is that the getpass library has OS dependent implementations of getpass.getpass(). Specifically, for windows, it uses getpass.win_getpass(). This function then uses msvcrt.putch() (Windows only library) to display the password prompt. However, putch() does not accept unicode characters (msvcrt.putwch() does but we can't exactly modify the library), and we use "from _future_ import unicode_literals" to make all string literals unicode. So the solution would be to detect if the OS is Windows and convert the password prompt from unicode type to str

Xavier Schildwachter
June 1, 2017, 8:50 PM
Edited

On fresh installation on Windows, I;m getting:

If the file is there then I'm not prompted as expected (but can't validate this).

Xavier Schildwachter
June 1, 2017, 9:18 PM
Edited

I can repro the problem on OSX (no .synapseConfig and no .synapseCache/.session).

Xavier Schildwachter
June 2, 2017, 7:29 PM

Per discussion with Larsson/Ziming, reopening.

Xavier Schildwachter
June 11, 2017, 10:08 AM

Verified fixed py-1.7 vs 184.0-x

Assignee

Ziming Dong

Reporter

Ziming Dong

Labels

None

Validator

Xavier Schildwachter

Development Area

None

Release Version History

None

Fix versions

Priority

Major
Configure