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] Nidoran Error because of special character #1855

Closed
toremielck opened this issue Jul 30, 2016 · 2 comments
Closed

[dev] Nidoran Error because of special character #1855

toremielck opened this issue Jul 30, 2016 · 2 comments

Comments

@toremielck
Copy link

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 toremielck changed the title Nidoran Error because of special character [dev] Nidoran Error because of special character Jul 30, 2016
@mercuriete
Copy link
Contributor

There are some work in progress i think

PR: #1809

@glitchsnob
Copy link

glitchsnob commented Jul 30, 2016

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

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

4 participants