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

[Dev] UnicodeDecodeError #1806

Closed
meska opened this issue Jul 30, 2016 · 6 comments
Closed

[Dev] UnicodeDecodeError #1806

meska opened this issue Jul 30, 2016 · 6 comments

Comments

@meska
Copy link

meska commented Jul 30, 2016

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: 2f277fd

@kolyasapphire
Copy link

Got this as well

@mingchuno
Copy link

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)

@sffetlio
Copy link

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 2f277fd

@mingchuno
Copy link

going to submit a PR

mingchuno added a commit to mingchuno/PokemonGo-Bot that referenced this issue Jul 30, 2016
mingchuno added a commit to mingchuno/PokemonGo-Bot that referenced this issue Jul 30, 2016
@matrix14
Copy link

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)
�[0m

Git commit: 2f277fd

@mingchuno
Copy link

@matrix14 PR submitted but haven't merge...please wait or you can use my branch first
mingchuno@da36859

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

6 participants