PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

utf-8 logger.py

Open uwgmk opened this issue 10 years ago • 6 comments

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

logger.py:21

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

should be

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

So we can bot in eg. Japan :)

[13:52:40] [x] Next egg incubates in 0.46 km
[13:52:41] Now at Pokestop: 古家石
[13:52:41] Spinning ...
[13:52:41] Possibly searching too often - taking a short rest :)
[13:52:42] Moving towards fort キノコ, 0.04km left
[13:52:46] Now at Pokestop: キノコ
[13:52:46] Spinning ...

uwgmk avatar Jul 30 '16 11:07 uwgmk

Duplicate of #1814 imho.

uwgmk avatar Jul 30 '16 11:07 uwgmk

I should have a fix for this in what I've done here; https://github.com/marksweb/PokemonGo-Bot/commit/9fdc0b82bae08885f12dd54093e2a711b6fdc18f

marksweb avatar Jul 30 '16 12:07 marksweb

Problem still there. Latest commit on dev

beranPro avatar Jul 30 '16 13:07 beranPro

@beranPro in my latest commit from my fork?

marksweb avatar Jul 30 '16 13:07 marksweb

@karasube not

print('[' + time.strftime("%H:%M:%S") + '] ' + string.decode('utf-8') But print('[' + time.strftime("%H:%M:%S") + '] ' + string.decode('utf-8')) Works for me so far

mcapala avatar Jul 30 '16 13:07 mcapala

No, Dev on this project

beranPro avatar Jul 30 '16 15:07 beranPro