UnicodeDecodeError - can't decode byte 0x94 - invalid start byte
Expected Behavior
Bot moves to fort
Actual Behavior
Bot crashs with UnicodeDecodeError
Your FULL config.json (remove your username, password, gmapkey and any other private info)
should not be the reason for the problem
Output when issue occurred
[2016-09-08 10:27:17] [ cli] [INFO]
[2016-09-08 10:27:17] [ cli] [INFO] Ran for 0:00:11
[2016-09-08 10:27:17] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h
[2016-09-08 10:27:17] [ cli] [INFO] Travelled 0.00km
[2016-09-08 10:27:17] [ cli] [INFO] Visited 0 stops
[2016-09-08 10:27:17] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
[2016-09-08 10:27:17] [ cli] [INFO] Threw 0 pokeballs
[2016-09-08 10:27:17] [ cli] [INFO] Earned 0 Stardust
[2016-09-08 10:27:17] [ cli] [INFO] Hatched eggs 0
[2016-09-08 10:27:17] [ cli] [INFO] Next egg hatches in 0.79 km
[2016-09-08 10:27:17] [ cli] [INFO]
[2016-09-08 10:27:17] [ cli] [INFO] Highest CP Pokemon:
[2016-09-08 10:27:17] [ cli] [INFO] Most Perfect Pokemon:
Traceback (most recent call last):
File "C:_COMED\priv\PoGo\PokemonGo-Bot\pokecli.py", line 803, in
Steps to Reproduce
I have just to start the Bot. I think there is a fort in the near with an öäü character.
Other Information
OS: Windows 10 Branch: dev Git Commit: b66fc8854a5594370ecc6a52266251c1a7dc5e13 Python Version: Python 2.7.12
same here
Traceback (most recent call last):
File "pokecli.py", line 803, in <module>
main()
File "pokecli.py", line 162, in main
bot.tick()
File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\__init__.py", line 685, in tick
if worker.work() == WorkerResult.RUNNING:
File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\cell_workers\move_to_fort.py", line 87, in work
data=fort_event_data
File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\base_task.py", line 43, in emit_event
data=data
File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\event_manager.py", line 76, in emit
handler.handle_event(event, sender, level, formatted_msg, data)
File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\event_handlers\logging_handler.py", line 140, in handle_event
getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8"))
File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x82 in position 41: invalid start byte
What is the encoding of your stout ? print sys.stdout.encoding
Had this too. Google Maps API has had too many requests from you due to restarting the bot too frequently. . Create a new one and replace the one in ./configs/auth.json (or by bash setup.sh create a new auth file
@fluxpiada Please create a ticket with your own issue and provide information's. This issue of for the decoding error.
@Anakin5: Do I need to put it in a particular part of the script or in general with a new interactive python command line? The two things I tried gave me: cp850.
I am not an expert in Python, but I changed logging_handler.py line 140 back to getattr(logger, level)(formatted_msg) and it works at the moment for me :)
ok, I though utf-8 would at least be able to cover all default encoding but looks like cp850 contains characters bytes that cannot be recognized as valid utf-8. Will commit a fix.
Fixed #5297