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

Logger error data with non asccii character #1897

Closed
tuccy opened this issue Jul 30, 2016 · 1 comment
Closed

Logger error data with non asccii character #1897

tuccy opened this issue Jul 30, 2016 · 1 comment

Comments

@tuccy
Copy link

tuccy commented Jul 30, 2016

Expected Behavior

porperly display of correct name

Actual Behavior

Raise an exception on python lib decode

Steps to Reproduce

Bot in spain near pokestop with ñ character

Other Information

OS:
Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)

Fix

pokemongo_bot/logger.py at line 20

if color not in color_hex:

REPLACE START

DEL print('[' + time.strftime("%H:%M:%S") + '] ' + string)

ADD print('[' + time.strftime("%H:%M:%S") + '] ' + string.decode('utf-8'))

END RELACE

else:
    print('[' + time.strftime("%H:%M:%S") + '] ' + u'\033[' + color_hex[color] + string.decode('utf-8') + '\033[0m')
if lcd:
    if string:
        lcd.message(string)
@sgitkene
Copy link

#1817 duplicate issue, fix already underway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants