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

Crash after pgoapi error

Open cmezh opened this issue 10 years ago • 6 comments

Expected Behavior

Reconnecting

Actual Behavior

2016-08-08 17:32:05,761 [pgoapi.pgoapi] [ERROR] Request for new Access Token failed! Logged out...
2016-08-08 17:32:07,203 [       cli] [INFO]
2016-08-08 17:32:07,219 [       cli] [INFO] Ran for 2:31:28
2016-08-08 17:32:07,220 [       cli] [INFO] Total XP Earned: 15975  Average: 6328.09/h
2016-08-08 17:32:07,221 [       cli] [INFO] Travelled 6.16km
2016-08-08 17:32:07,222 [       cli] [INFO] Visited 108 stops
2016-08-08 17:32:07,222 [       cli] [INFO] Encountered 41 pokemon, 40 caught, 41 released, 0 evolved, 2 never seen before
2016-08-08 17:32:07,223 [       cli] [INFO] Threw 42 pokeballs
2016-08-08 17:32:07,224 [       cli] [INFO] Earned 6662 Stardust
2016-08-08 17:32:07,225 [       cli] [INFO]
2016-08-08 17:32:07,226 [       cli] [INFO] Highest CP Pokemon: Drowzee [CP: 409] [IV: 10/3/6] Potential: 0.42
2016-08-08 17:32:07,227 [       cli] [INFO] Most Perfect Pokemon: Horsea [CP: 10] [IV: 15/10/6] Potential: 0.69
Traceback (most recent call last):
  File "pokecli.py", line 503, in <module>
    main()
  File "pokecli.py", line 107, in main
    formatted='Log logged in, reconnecting in {:s}'.format(wait_time)
ValueError: Unknown format code 's' for object of type 'int'
2016-08-08 17:32:07,427 [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 "/home/cmezh/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/home/cmezh/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/home/cmezh/PokemoonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/home/cmezh/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
    response = self._open(req, data)
  File "/home/cmezh/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
    '_open', req)
  File "/home/cmezh/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/home/cmezh/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/home/cmezh/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python2.7/httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/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)
2016-08-08 17:32:07,528 [sentry.errors.uncaught] [ERROR] [u"ValueError: Unknown format code 's' for object of type 'int'", u'  File "pokecli.py", line 503, in <module>', u'  File "pokecli.py", line 107, in main']
Sentry is attempting to send 1 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
Process crashed with exit code 1.  Respawning in 1 hour.

Steps to Reproduce

Just run and wait 'till it happen

Other Information

OS: Ubuntu 16.04 armv7l Git Commit: 563f898f61233ff86d38d83b68d8399c1f63051b Python Version: Python 2.7.12

cmezh avatar Aug 08 '16 11:08 cmezh

According to 2016-08-08 17:32:07,528 [sentry.errors.uncaught] [ERROR] [u"ValueError: Unknown format code 's' for object of type 'int'", u' File "pokecli.py", line 503, in <module>', u' File "pokecli.py", line 107, in main'] it seems that it's trying to parse an int as a string.

Outpox avatar Aug 08 '16 11:08 Outpox

I think, I fixed it. Made pull request.

cmezh avatar Aug 08 '16 12:08 cmezh

Merged to dev

cmezh avatar Aug 08 '16 15:08 cmezh

yep

solderzzc avatar Aug 08 '16 15:08 solderzzc

good catch, forgot the contributor.me.

solderzzc avatar Aug 08 '16 15:08 solderzzc

Thanks. My first commit ever ^.^

cmezh avatar Aug 08 '16 17:08 cmezh