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

[dev] Nidoran Error because of special character

Open toremielck opened this issue 10 years ago • 2 comments

I thibk this error is caused by the special characters for female / male in Nidoran's name

Traceback (most recent call last): File "pokecli.py", line 464, in main() File "pokecli.py", line 68, in main bot.tick() File "/Users/toremielck/Desktop/PokemonGo-Bot-silosilosiloPTC/pokemongo_bot/init.py", line 84, in tick if worker.work() == WorkerResult.RUNNING: File "/Users/toremielck/Desktop/PokemonGo-Bot-silosilosiloPTC/pokemongo_bot/cell_workers/move_to_fort_worker.py", line 43, in work logger.log('Moving towards fort {}, {} left'.format(fort_name, format_dist(dist, unit))) File "/Users/toremielck/Desktop/PokemonGo-Bot-silosilosiloPTC/pokemongo_bot/logger.py", line 21, in log print('[' + time.strftime("%H:%M:%S") + '] ' + string) File "/Users/toremielck/Desktop/PokemonGo-Bot-silosilosiloPTC/lib/python2.7/codecs.py", line 369, in write data, consumed = self.encode(object, self.errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 49: ordinal not in range(128)

toremielck avatar Jul 30 '16 13:07 toremielck

There are some work in progress i think

PR: https://github.com/PokemonGoF/PokemonGo-Bot/pull/1809

mercuriete avatar Jul 30 '16 13:07 mercuriete

This is working for me.

change line 21 in logger.py to the following

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

credit to another commentator on a this issue thread #1833

glitchsnob avatar Jul 30 '16 15:07 glitchsnob