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

Stops at 1 hour

Open icecubeice opened this issue 10 years ago • 11 comments

The bot works perfectly fine but it stops after about 1hour, is there a way to extend this?

Other Information

OS: Windows 10 Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here) Python Version: (run 'python -V' and paste it here)

icecubeice avatar Aug 08 '16 14:08 icecubeice

@icecubeice i had the same problem. Try git pull, it solved my problem

siembz avatar Aug 08 '16 14:08 siembz

Yes, this is going to be fixed in a pull request for the Pokemon Go API. When it's applied, you'll want to to a pip install -r requirements.txt to pull the latest version. But as of right now that change hasn't been merged to master so it won't fix the issue just yet.

To fix it now instead of waiting for the PR:

  • Go to file: "PokemonGo-Bot/src/pgoapi/pgoapi/auth_google.py"
  • Add to line 94: "return self._access_token"

_(Line 94 is just below: "self.log.debug('Google Access Token: %s...', self.access_token[:25])")

That should fix it. The API forgot to return the token.

PlanetoftheMapes avatar Aug 08 '16 14:08 PlanetoftheMapes

Soo just add return before self? "self.log.debug('Google Access Token: %s...', self._access_token[:25]) or? Sorry that i don't understand that right away, im not that into coding.

Nathanian avatar Aug 08 '16 16:08 Nathanian

@Nathanian Here image

akatasonov avatar Aug 08 '16 16:08 akatasonov

Thank you so much :)

Nathanian avatar Aug 08 '16 16:08 Nathanian

For Linux users with same problem:

#!/bin/sh
while true
do:
./run.sh
done

Just save it on a .sh file(I named it re-run.sh) and make it runnable by (sudo chmod a+x re-run.sh), then run it . Your bot runs again and again infinitely.

fepersembe avatar Aug 08 '16 18:08 fepersembe

I have the return self.access_token but it wont go beyond 1 h

icecubeice avatar Aug 08 '16 21:08 icecubeice

tried that solution, but didnt work. Still crashing after 1 hour :(

noncicredo avatar Aug 09 '16 01:08 noncicredo

Removed and updated pgoapi. 1+ hour running right now. No crash. Will update if it crashes (or not). Update: Total Run time 1h 08m Traceback (most recent call last): File "/usr/lib/python2.7/logging/init.py", line 851, in emit msg = self.format(record) File "/usr/lib/python2.7/logging/init.py", line 724, in format return fmt.format(record) File "/usr/lib/python2.7/logging/init.py", line 464, in format record.message = record.getMessage() File "/usr/lib/python2.7/logging/init.py", line 328, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Logged from file init.py, line 547

Followed by Traceback (most recent call last): File "pokecli.py", line 493, in main() File "pokecli.py", line 129, in main raise e TypeError: None has type <type 'NoneType'>, but expected one of: (<type 'str'>, <type 'unicode'>)

pranavperfect avatar Aug 09 '16 07:08 pranavperfect

Well let's all just wait for the PR

icecubeice avatar Aug 09 '16 13:08 icecubeice

As there have been many updates since this issue was posted, I'm assuming this issue has been resolved. If I'm wrong, please reopen.

RedViper9 avatar Aug 11 '16 08:08 RedViper9