RE: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

2013-11-27 Thread Hoàng Tuấn Việt
Hi Fabio, I cannot see your reply in python-list until I search this question on Internet again. I try (username.encode('utf-8') + '\r') and the problem is fixed. Thank you very much. Viet >You should be able to reproduce the same behavior on PyDev if in your run >configuratio

UnicodeDecodeError: 'ascii' codec can't decodee byte 0xff in position 0: ordinal not in range(128)

2013-11-18 Thread Hoàng Tuấn Việt
Hi all, I use Python telnetlib on Windows 7 32 bit. Here is my code: def telnet(self, host, os, username, password): connection = telnetlib.Telnet(host) connection.read_until('login: ') connection.write(username + '\r') connection.read_until('assword