-
Notifications
You must be signed in to change notification settings - Fork 86
[simulation] handle exception in heartbeat #1
base: simulation
Are you sure you want to change the base?
Conversation
loveit Can we actually do this retry on the |
[simulation] api request auto-retries. output lines up.
amended. how's that? |
Someone can please make a tutorial how can we locally merge the pull requests to use the latest version? |
Take your api_req, add while True: to the top of it, indent everything below by one tab. |
I am getting this error after a while Using "[simulation] handle exception in heartbeat" pull request pull request : #1 my main file : http://pastebin.com/4fxJuYNv error message : https://i.snag.gy/Hl9r8q.jpg |
@MonsterMMORPG the payload is empty so u need to put a check there.
This is in the heartbeat process and I have put a while loop on heartbeat and if it returns None the request is repeated with a break. |
@therealssj can you show me where should i put in in this file? http://pastebin.com/4fxJuYNv |
@MonsterMMORPG it's not a single line but multiple changes.
It's a dirty implementation but works for now |
@therealssj awesome ty. 1 more thing. can you show me how can i play a sound when an error occurred? i am trying to run infinite loop and i dont want to check it constantly :D |
The issue is I don't have any idea how to detect global errors so I can On Jul 17, 2016 16:12, "Mehul" [email protected] wrote:
|
any idea why I keep getting a index out of range at line 271 |
@Twinters007 same here it is because the servers are screwed and errors are not handled properly |
@memelyfe can you check whether the searching algorithm can be improved or not? i am running 3 instances and nothing worthy appears in my city :( |
I think I just did. https://github.com/leegao/pokemongo-api-demo/blob/simulation/main.py#L282 What I suspect is happening is the algorithm is supposed to go x steps, then start over, but in this line, it sets [original latitude] to [currently used latitude]. so when it resets, it doesn't actually go back to home. This combined with going only forward along the walk instead of forward and backward would explain why everything shifts upwards. I also got rid of the walk = getNeighbors(), because the first walk already gets 20 steps (10+ and 10-), so I think finding neighbors each iteration isn't what we want. UPDATE: So I think it has to do with S2 and Hillbert Curves, so I tried using just a grid of points, but it doesn't seem to work with the heartbeat and everything. Ideas? |
@Twinters007 so what changes do we need to make to fix? ty |
fixes the script exiting whenever heartbeat has an issue (which seems to happen often)