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

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

Closed
rakuuhwa opened this issue Oct 10, 2017 · 9 comments

Comments

@rakuuhwa
Copy link

Steps to Reproduce

Fresh start of the bot after a clean generation of config+auth files

Output when issue occurred

--------------------Starting bot--------------------

2017-10-10 14:40:02,233 [ cli] [INFO] PokemonGO Bot v1.0
2017-10-10 14:40:02,244 [ cli] [INFO] commit: unknown
2017-10-10 14:40:02,246 [ cli] [INFO] No auth argument specified, checking for C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot..\configs\auth.json
2017-10-10 14:40:02,246 [ cli] [INFO] No config argument specified, checking for C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot..\configs\config.json
2017-10-10 14:40:02,250 [ cli] [INFO] Configuration initialized
2017-10-10 14:40:02,250 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2017-10-10 14:40:02,252 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2017-10-10 14:40:02,259 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
(6532) wsgi starting up on http://127.0.0.1:4000
[2017-10-10 14:40:02] [PokemonGoBot] [INFO] Setting start location.
[2017-10-10 14:40:04] [PokemonGoBot] [INFO] Location found: budapest (47.497912, 19.040235, 0.0)
[2017-10-10 14:40:04] [PokemonGoBot] [INFO] Now at (47.497912, 19.040235, 0.0)
[2017-10-10 14:40:04] [PokemonGoBot] [INFO] Login procedure started.
[2017-10-10 14:40:11] [PokemonGoBot] [INFO] Login successful.
[2017-10-10 14:40:11] [PokemonGoBot] [INFO] Checking for captcha challenge.
[2017-10-10 14:40:11] [PokemonGoBot] [WARNING] No 2captcha token set, executing manual solving
[2017-10-10 14:40:11] [PokemonGoBot] [ERROR] Error with Chromedriver, please ensure it is the latest version.
Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.del of <selenium.webdriver.chrome.service.Service object at 0x0000000008ABC208>> ignored
_inventory was not initialized
inventory was not initialized
[2017-10-10 14:40:11] [ cli] [INFO]
[2017-10-10 14:40:11] [ cli] [INFO] Ran for 0:00:09
[2017-10-10 14:40:11] [ cli] [INFO] Total XP Earned: 0 Average: 0.00/h
[2017-10-10 14:40:11] [ cli] [INFO] Travelled 0.00km
[2017-10-10 14:40:11] [ cli] [INFO] Visited 0 stops
[2017-10-10 14:40:11] [ cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
[2017-10-10 14:40:11] [ cli] [INFO] Threw 0 pokeballs
[2017-10-10 14:40:11] [ cli] [INFO] Earned 0 Stardust
[2017-10-10 14:40:11] [ cli] [INFO] Hatched eggs 0
[2017-10-10 14:40:11] [ cli] [INFO]
[2017-10-10 14:40:11] [ cli] [INFO] Highest CP Pokemon:
[2017-10-10 14:40:11] [ cli] [INFO] Most Perfect Pokemon:
Traceback (most recent call last):
File "pokecli.py", line 978, in
main()
File "pokecli.py", line 247, in main
bot = start_bot(bot, config)
File "pokecli.py", line 199, in start_bot
bot.start(bot)
File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot_init
.py", line 186, in start
self.setup_api()
File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot_init
.py", line 1187, in setup_api
self.login()
File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot_init
.py", line 1099, in login
formatted="Login successful."
File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\event_manager.py", line 209, in emit
handler.handle_event(event, sender, level, formatted_msg, data)
File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\event_handlers\captcha_handler.py", line 98, in handle_event
token = self.get_token(url)
File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\event_handlers\captcha_handler.py", line 48, in get_token
sys.exit(1)
NameError: global name 'sys' is not defined
[2017-10-10 14:40:11] [sentry.errors] [ERROR] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\raven\transport\threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "C:\Python27\lib\site-packages\raven\transport\http.py", line 47, in send
ca_certs=self.ca_certs,
File "C:\Python27\lib\site-packages\raven\utils\http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 494, in open
response = self._open(req, data)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 512, in _open
'_open', req)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 466, in _call_chain
result = func(*args)
File "C:\Python27\lib\site-packages\raven\utils\http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "C:\Python27\lib\site-packages\future\backports\urllib\request.py", line 1284, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "C:\Python27\lib\httplib.py", line 1057, in request
self._send_request(method, url, body, headers)
File "C:\Python27\lib\httplib.py", line 1097, in _send_request
self.endheaders(body)
File "C:\Python27\lib\httplib.py", line 1053, in endheaders
self._send_output(message_body)
File "C:\Python27\lib\httplib.py", line 895, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
[2017-10-10 14:40:11] [sentry.errors.uncaught] [ERROR] [u"NameError: global name 'sys' is not defined", u' File "pokecli.py", line 978, in ', u' File "pokecli.py", line 247, in main', u' File "pokecli.py", line 199, in start_bot', u' File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\init.py", line 186, in start', u' File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\init.py", line 1187, in _setup_api', u' File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\init.py", line 1099, in login', u' File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\event_manager.py", line 209, in emit', u' File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\event_handlers\captcha_handler.py", line 98, in handle_event', u' File "C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot\event_handlers\captcha_handler.py", line 48, in get_token']

Something went wrong and the bot needed to be restarted. Please investigate the cause.

Waiting for 56 seconds, press a key to continue ...
2017-10-10 14:40:23,204 [ cli] [INFO] PokemonGO Bot v1.0
2017-10-10 14:44:38,732 [ cli] [INFO] commit: unknown
2017-10-10 14:44:38,733 [ cli] [INFO] No auth argument specified, checking for C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot..\configs\auth.json
2017-10-10 14:44:38,733 [ cli] [INFO] No config argument specified, checking for C:\Users\birdo\PokemonGo-BootPokemonGo-Bot\pokemongo_bot..\configs\config.json
2017-10-10 14:44:38,739 [ cli] [INFO] Configuration initialized
2017-10-10 14:44:38,740 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2017-10-10 14:44:38,740 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2017-10-10 14:44:38,759 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\eventlet\hubs\hub.py", line 457, in fire_timers
timer()
File "C:\Python27\lib\site-packages\eventlet\hubs\timer.py", line 58, in call
cb(*args, **kw)
File "C:\Python27\lib\site-packages\eventlet\green\thread.py", line 41, in __thread_body
func(*args, **kwargs)
File "C:\Python27\lib\threading.py", line 774, in __bootstrap
self.__bootstrap_inner()
File "C:\Python27\lib\threading.py", line 814, in __bootstrap_inner
(self.name, _format_exc()))
File "C:\Python27\lib\codecs.py", line 369, in write
data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 665: ordinal not in range(128)


Other Information

OS:
Win10
Branch:
master
Git Commit:
6f6ca78'
config.json:valid
Python Version: Python 2.7.12

I am attempting to start the bot with the Windows bat file, but crashes immidiatelly with the above errorlog.

@goedzo
Copy link
Contributor

goedzo commented Oct 10, 2017

I think a captcha is shown here, but since i see this:

Error with Chromedriver, please ensure it is the latest version.
I suspect you need to update chrome driver to display the captcha?

@rakuuhwa
Copy link
Author

After i deleted the file, the bot still displays the error message below that.

@MerlionRock
Copy link
Contributor

For manual solving of Captcha to work, you will need to install Chromedriver to the root folder of your pokemon go folder.

See this #6050

To download the chromedriver: https://sites.google.com/a/chromium.org/chromedriver/downloads

@MerlionRock
Copy link
Contributor

#6219 Added instruction to installation guides

@rakuuhwa
Copy link
Author

@MerlionRock and @goedzo
The issue persists after the deletion of the chromedriver. the error message is the same.

@MerlionRock
Copy link
Contributor

MerlionRock commented Oct 11, 2017

@rakuuhwa You mean you have chrome driver installed in root folder of the bot but still sees the error?

If you delete the driver, the error message will definitely be there. You need to login to phone to solve the captcha before you can continue.

@MerlionRock
Copy link
Contributor

MerlionRock commented Oct 11, 2017

@rakuuhwa Can you try this?

  1. Make sure you have Chrome installed on your computer
  2. Install chrome driver for Windows from here: https://sites.google.com/a/chromium.org/chromedriver/downloads
    make sure it chromedriver.exe is at root folder of the bot
  3. Go to requirements.txt and change "selenium==2.53.6" to "selenium==3.5.0"
  4. Follow the update instruction for the bot for Windows here: https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/docs/manual_installation.md

Let me know if it solve the problems as I am on a different OS as you and I don't have any account that faces the captcha problem

@rakuuhwa
Copy link
Author

errorLog.txt
What i was trying to say, have completely erased all traces of the chrome form my pc, and the error is still dropping the same error after the most perfect pokemon line.

@MerlionRock
Copy link
Contributor

Fixed. Closing issue

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

3 participants