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

Stops at 1 hour #3075

Closed
icecubeice opened this issue Aug 8, 2016 · 11 comments
Closed

Stops at 1 hour #3075

icecubeice opened this issue Aug 8, 2016 · 11 comments

Comments

@icecubeice
Copy link

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)

@siembz
Copy link

siembz commented Aug 8, 2016

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

@PlanetoftheMapes
Copy link

PlanetoftheMapes commented Aug 8, 2016

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.

@Nathanian
Copy link

Nathanian commented Aug 8, 2016

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.

@akatasonov
Copy link

@Nathanian Here
image

@Nathanian
Copy link

Thank you so much :)

@fepersembe
Copy link

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.

@icecubeice
Copy link
Author

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

@noncicredo
Copy link

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

@pranavperfect
Copy link

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'>)

@icecubeice
Copy link
Author

icecubeice commented Aug 9, 2016

Well let's all just wait for the PR

@RedViper9
Copy link
Contributor

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.

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

9 participants