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

[Dev] UnicodeDecodeError

Open meska opened this issue 10 years ago • 6 comments

Actual Behavior

File "/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)))

crash with non ascii fort names: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: ordinal not in range(128)

Other Information

OS: MacOsx Git Commit: 2f277fd7d08ff9a7ad45cf46e102a00db7ba9fdf

meska avatar Jul 30 '16 08:07 meska

Got this as well

kolyasapphire avatar Jul 30 '16 08:07 kolyasapphire

Got this too

Traceback (most recent call last):
  File "pokecli.py", line 464, in <module>
    main()
  File "pokecli.py", line 68, in main
    bot.tick()
  File "/Users/mcor/dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 84, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/Users/mcor/dev/PokemonGo-Bot/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/mcor/dev/PokemonGo-Bot/pokemongo_bot/logger.py", line 21, in log
    print('[' + time.strftime("%H:%M:%S") + '] ' + string)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 369, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 31: ordinal not in range(128)

mingchuno avatar Jul 30 '16 08:07 mingchuno

Got it too Traceback (most recent call last): File "pokecli.py", line 464, in <module> main() File "pokecli.py", line 68, in main bot.tick() File "/home/svetlio/Downloads/PokemonGo-Bot/pokemongo_bot/__init__.py", line 84, in tick if worker.work() == WorkerResult.RUNNING: File "/home/svetlio/Downloads/PokemonGo-Bot/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 "/home/svetlio/Downloads/PokemonGo-Bot/pokemongo_bot/logger.py", line 21, in log print('[' + time.strftime("%H:%M:%S") + '] ' + string) File "/usr/lib/python2.7/codecs.py", line 369, in write data, consumed = self.encode(object, self.errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 31: ordinal not in range(128) on 2f277fd7d08ff9a7ad45cf46e102a00db7ba9fdf

sffetlio avatar Jul 30 '16 08:07 sffetlio

going to submit a PR

mingchuno avatar Jul 30 '16 08:07 mingchuno

Still the same

Traceback (most recent call last):
  File "pokecli.py", line 464, in <module>
    main()
  File "pokecli.py", line 68, in main
    bot.tick()
  File "/home/PokemonGo-Bot/pokemongo_bot/__init__.py", line 84, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/home/PokemonGo-Bot/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 "/home/PokemonGo-Bot/pokemongo_bot/logger.py", line 21, in log
    print('[' + time.strftime("%H:%M:%S") + '] ' + string)
  File "/usr/lib/python2.7/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 39: ordinal not in range(128)


Git commit: 2f277fd7d08ff9a7ad45cf46e102a00db7ba9fdf

matrix14 avatar Jul 30 '16 09:07 matrix14

@matrix14 PR submitted but haven't merge...please wait or you can use my branch first https://github.com/mingchuno/PokemonGo-Bot/commit/da368592addf7e71b6999f07827fb0565c535c0f

mingchuno avatar Jul 30 '16 09:07 mingchuno