Solve UnicodeEncodeError on output

I got an "UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 22: ordinal not in range(128)" in line 644 when the server had a non ascii character in the sponsors name.
This commit is contained in:
Neubda 2016-07-27 15:27:15 +02:00 committed by GitHub
parent 7b09d8759f
commit f4b508d395
1 changed files with 1 additions and 1 deletions

View File

@ -641,7 +641,7 @@ def speedtest():
servers = closestServers(config['client'])
if not args.simple:
print_('Testing from %(isp)s (%(ip)s)...' % config['client'])
print_(('Testing from %(isp)s (%(ip)s)...' % config['client']).encode('utf-8', 'ignore'))
if args.server:
try: