PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heartbeat function

rakuuhwa opened this issue · comments

When running any form of the bot (multi or single too) the heartbeats are not sent out, instead in the console the below EM appears:
[2017-10-18 08:20:32] [MainThread] [PokemonCatchWorker] [INFO] Candy gained: 3. You now have 15 Hoothoot candy!
[2017-10-18 08:20:32] [MainThread] [MoveToFort] [INFO] [2017-10-18 08:20:32] [MainThread] [MoveToFort] [INFO] Moving towards pokestop A*****ke - 0.05km
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 801, in _bootstrap_inner
self.run()
File "C:\Python27\lib\threading.py", line 1073, in run
self.function(*self.args, **self.kwargs)
File "C:\Users\birdo\PokemonGo-Bot\pokemongo_bot_init
.py", line 1587, in heartbeat
self.get_inbox_time = int(datetime.datetime.now().strftime("%s")) * 1000
ValueError: Invalid format string

[2017-10-18 08:20:35] [MainThread] [UpdateLiveStats] [INFO] ***** | Uptime : 0:19:04 | Earned 4,100 Stardust | +11,685 XP | 36,775 XP/h | Visited 7 stops | Total Stardust: 8,200
[2017-10-18 08:20:38] [MainThread] [ SpinFort] [INFO] [2017-10-18 08:20:38] [MainThread] [ SpinFort] [INFO] Spun pokestop A******ke (8 streak). Experience awarded: 50. Items awarded: 2x Potion, 1x Pokeball

It is mid run, and after it the bot continues with the account, but it does not display any data where or how the mouses are standing.

I did a bit of googling: http://stackoverflow.com/a/11743262
Python doesn't actually support %s as an argument to strftime (if you check at
http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior it's not in the list), the only
reason it's working is because Python is passing the information to your system's strftime, which uses
your local timezone.
The usage of strftime("%s") is platform dependent and seems to not work on windows.

This problem should have solved. Of not we can open again. Closing now.