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

Bot crashes when trying to join a zone that is already captured #5

Open
masonelmore opened this issue Jul 3, 2018 · 0 comments
Open
Labels
bug Something isn't working

Comments

@masonelmore
Copy link
Owner

03-07-18 13:20:11 display  INFO     --- Active Planets ---
03-07-18 13:20:11 display  INFO     Planet  Progress  Boss  High  Medium  Low
03-07-18 13:20:11 display  INFO     527       92.68%     0     0       0   20
03-07-18 13:20:11 display  INFO     529       71.99%     0     0       0   41
03-07-18 13:20:11 display  INFO     530       68.51%     0     0       0   37
03-07-18 13:20:11 display  INFO     532       52.47%     0     2      18   33
03-07-18 13:20:11 display  INFO     533       37.79%     0     0      22   43
03-07-18 13:20:11 bot      DEBUG    Joining Zone 67 on Planet 532
03-07-18 13:20:12 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /ITerritoryControlMinigameService/JoinZone/v0001/ HTTP/1.1" 200 15
03-07-18 13:20:12 bot      DEBUG    Calling join_zone() gave eresult: 2 - Failed to join game 83804 10
03-07-18 13:20:12 bot      DEBUG    Retrying API call in 1 seconds...
03-07-18 13:20:13 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /ITerritoryControlMinigameService/JoinZone/v0001/ HTTP/1.1" 200 15
03-07-18 13:20:13 bot      DEBUG    Calling join_zone() gave eresult: 2 - Failed to join game 83804 10
03-07-18 13:20:13 bot      DEBUG    Retrying API call in 2 seconds...
03-07-18 13:20:15 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /ITerritoryControlMinigameService/JoinZone/v0001/ HTTP/1.1" 200 15
03-07-18 13:20:15 bot      DEBUG    Calling join_zone() gave eresult: 2 - Failed to join game 83804 10
03-07-18 13:20:15 bot      DEBUG    Retrying API call in 4 seconds...
03-07-18 13:20:19 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /ITerritoryControlMinigameService/JoinZone/v0001/ HTTP/1.1" 200 15
03-07-18 13:20:19 bot      DEBUG    Calling join_zone() gave eresult: 2 - Failed to join game 83804 10
03-07-18 13:20:19 bot      DEBUG    Retrying API call in 8 seconds...
03-07-18 13:20:28 urllib3.connectionpool DEBUG    https://community.steam-api.com:443 "POST /ITerritoryControlMinigameService/JoinZone/v0001/ HTTP/1.1" 200 15
03-07-18 13:20:28 bot      DEBUG    Calling join_zone() gave eresult: 27 - That zone is captured
03-07-18 13:20:28 bot      DEBUG    Retrying API call in 16 seconds...
03-07-18 13:20:44 root     ERROR    ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * !
03-07-18 13:20:44 root     ERROR    ! Something went horribly wrong.  Restarting bot... !
03-07-18 13:20:44 root     ERROR    ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * ! * !
03-07-18 13:20:44 root     DEBUG    Unhandled exception:
Traceback (most recent call last):
  File "main.py", line 48, in <module>
    bot.run()
  File "D:\Programming\Python\salienbot\bot.py", line 64, in run
    self._call_api(self.api.join_zone, self.zone.id)
  File "D:\Programming\Python\salienbot\bot.py", line 91, in _call_api
    raise Exception('Unable to recover from failed API call attempts')

I assume this happens when the zone gets captured between the time we decide to join the zone and we send the request to join. Fixing this will require me to rework the bot's error handling (which I have been putting off for a while now).

@masonelmore masonelmore added the bug Something isn't working label Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant