I'm seeing an issue where near exactly after 1 hour of runtime (+- 15 seconds within the hour) the bot ends up crashing. My assumption is that it's related to a softban happening after 1 hr, possibly due to some sort of bracketing that Niantic may have added that says "if within 1 hour, a user gains more than X points, X pokemon caught, or X pokestops spun, do a soft ban for X minutes".
If it's related to the softban, then this may be a duplicate of #2965.
UPDATE: duplicate of issue #2874. Please Close.
I'm curious if others are seeing this issue as well.
Steps to Reproduce
Run bot for 1 hour. I'm using Windows, I imagine since this seems to be related to a server-side message from the API that it'll affect all platforms.
Other Information
Traceback (most recent call last):
File "pokecli.py", line 503, in
main()
File "pokecli.py", line 134, in main
raise e
TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)
2016-08-07 18:47:13,788 [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (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
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 0x9c in position 1: invalid start byte
2016-08-07 18:47:13,792 [sentry.errors.uncaught] [ERROR] [u"TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)", u' File "pokedelay.py", line 13, in ', u' File "pokecli.py", line 504, in ', u' File "pokecli.py", line 135, in main']
@mrthrowaway Thanks, that's the issue alright. Please close as duplicate.
135 mins, I crashed on the vip catch
@FriskyScooter that may be a different issue, I checked and mine was fine with VIP's
Mine crashed after exactly one hour also. I'm wondering if the session is becoming "stale."
Something is timing out after 60min.
Traceback (most recent call last):
File "pokecli.py", line 502, in
main()
File "pokecli.py", line 133, in main
raise e
TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)
2016-08-08 00:42:11,081 [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/ben/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/ben/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/home/ben/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/home/ben/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/home/ben/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/home/ben/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/home/ben/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/ben/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 00:42:11,082 [sentry.errors.uncaught] [ERROR] [u"TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)", u' File "pokecli.py", line 502, in ', u' File "pokecli.py", line 133, in main']
Fixed by https://github.com/keyphact/pgoapi/pull/49
Nice @rbignon!
I patched it based on the return added in the API PR. I'll report back if we get past 1 hour this time. The failure was pretty consistent beforehand. I'm expecting this will fix it.
Confirmed fixed by API update. :tada:
Please Close this issue.
still crashing afte 1 hour (no matter the api or git pull update, i got the latest udpate and it didnt fix it)
i've also tried https://github.com/PokemonGoF/PokemonGo-Bot/issues/3075 without solving the problem
@noncicredo thanks for the TD, are you using google auth?
Also are you using the latest DEV branch?
Yes, Google auth
Yes, latesr dev branch (downloaded yesterday evening)