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

UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)

Open ghost opened this issue 10 years ago • 10 comments

Expected Behavior

Bot to start

Actual Behavior

Bot comes up with following error

UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) 2016-08-07 20:20:30,273 [sentry.errors.uncaught] [ERROR] [u'WindowsError: [Error 126] The specified module could not be found', u' File "pokecli.py", line 493, in <module>', u' File "pokecli.py", line 127, in main', u' File "pokecli.py", line 136, in report_summary', u' File "C:\\Users\\user\\Desktop\\Bot\\PokemonGo-Bot\\pokemongo_bot\\metrics.py", line 76, in capture_stats', u' File "C:\\Users\\user\\Desktop\\Bot\\PokemonGo-Bot\\pokemongo_bot\\api_wrapper.py", line 106, in call', u' File "C:\\Users\\user\\Desktop\\Bot\\PokemonGo-Bot\\pokemongo_bot\\api_wrapper.py", line 63, in _call', u' File "c:\\users\\user\\desktop\\bot\\pokemongo-bot\\src\\pgoapi\\pgoapi\\pgoapi.py", line 210, in call', u' File "c:\\users\\user\\desktop\\bot\\pokemongo-bot\\src\\pgoapi\\pgoapi\\rpc_api.py", line 85, in activate_signature', u' File "C:\\Python27\\lib\\ctypes\\__init__.py", line 443, in LoadLibrary', u' File "C:\\Python27\\lib\\ctypes\\__init__.py", line 365, in __init__']

Steps to Reproduce

python pokecli.py

Other Information

OS: Windows 10 Pro 64bit Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here - didnt do anything when ran) Python Version: 2.7.10

ghost avatar Aug 07 '16 19:08 ghost

I have this problem too.

n3wdev avatar Aug 07 '16 19:08 n3wdev

I have it too.

gregzetko avatar Aug 07 '16 19:08 gregzetko

same here

rmoro avatar Aug 07 '16 19:08 rmoro

Add these lines in pokecli.py

reload(sys)
sys.setdefaultencoding('utf8')

def main():
    try:
        reload(sys)
        sys.setdefaultencoding('utf8')
        logger.info('PokemonGO Bot v1.0')

thxmxx avatar Aug 07 '16 19:08 thxmxx

I have the same problem. Thanks @thxmxx for suggestion, but unfortunately it didn't solve the problem for me. Same error.

alextj avatar Aug 07 '16 19:08 alextj

@GitPupper fixed the issue for me

rmoro avatar Aug 07 '16 19:08 rmoro

@Guineaa Set to false the health_record in the config file

  "health_record": false

And if you haven't done it already, pull the lastest dev version. Also be sure to have the correct encrypt file.

BriceSD avatar Aug 07 '16 20:08 BriceSD

@GitPupper @BriceSD Thank you both! Your instructions fixed my bot. Note I also switched over from using the master branch to the dev branch which was needed to get it running.

jtara1 avatar Aug 07 '16 21:08 jtara1

For me it was my own tinkering with config file, I had encrypt.so already in bot folder and health record set to false and still received this error. I had FollowPath in config, probably bad formatting or wrong place in config. (Yeah documentation for creating config files is ..at least not very intuitive.)

wereii avatar Aug 07 '16 21:08 wereii

Ok cheers everyone working fine now! Ended up being a mixture of the config and changing over to dev mode.

ghost avatar Aug 07 '16 21:08 ghost