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

Telegram connection problems halting bot #4935

Closed
Lntnam opened this issue Aug 30, 2016 · 12 comments
Closed

Telegram connection problems halting bot #4935

Lntnam opened this issue Aug 30, 2016 · 12 comments
Labels

Comments

@Lntnam
Copy link

Lntnam commented Aug 30, 2016

I've just come back from work and the log shows me these:

2016-08-30 17:25:42,234 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:25:58,921 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:26:15,090 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:27:15,525 [       cli] [INFO] 
2016-08-30 17:27:15,525 [       cli] [INFO] Ran for 6:33:39
2016-08-30 17:27:15,526 [       cli] [INFO] Total XP Earned: 15160  Average: 2310.65/h
2016-08-30 17:27:15,526 [       cli] [INFO] Travelled 3.88km
2016-08-30 17:27:15,526 [       cli] [INFO] Visited 45 stops
2016-08-30 17:27:15,526 [       cli] [INFO] Encountered 85 pokemon, 83 caught, 56 released, 0 evolved, 0 never seen before ()
2016-08-30 17:27:15,526 [       cli] [INFO] Threw 115 pokeballs
2016-08-30 17:27:15,526 [       cli] [INFO] Earned 9120 Stardust
2016-08-30 17:27:15,526 [       cli] [INFO] Hatched eggs 1
2016-08-30 17:27:15,526 [       cli] [INFO] Next egg hatches in 3.80 km
2016-08-30 17:27:15,526 [       cli] [INFO] 
2016-08-30 17:27:15,526 [       cli] [INFO] Highest CP Pokemon: Pinsir [CP: 1314] [IV: 15/6/5] Potential: 0.58 
2016-08-30 17:27:15,526 [       cli] [INFO] Most Perfect Pokemon: Staryu [CP: 475] [IV: 14/13/15] Potential: 0.93 
Traceback (most recent call last):
  File "pokecli.py", line 764, in <module>
    main()
  File "pokecli.py", line 130, in main
    bot.tick()
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/__init__.py", line 644, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/cell_workers/telegram_task.py", line 36, in work
    for update in self.tbot.getUpdates(offset=self.update_id, timeout=10):
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 121, in decorator
    result = func(self, *args, **kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 1220, in getUpdates
    result = request.post(url, data, timeout=urlopen_timeout)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 235, in post
    **urlopen_kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 166, in _request_wrapper
    raise NetworkError('urllib3 HTTPError {0}'.format(error))
telegram.error.NetworkError: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x105b3e790>: Failed to establish a new connection: [Errno 65] EHOSTUNREACH',))

Happened a few times continuously. Bot continue after 20 seconds then happens again.

And a couple of these:

2016-08-30 17:40:41,191 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:41:15,099 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:41:27,223 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connec

I didn't call telegram /info during that period.

Not that I am looking for a fix but I think this one worth be investigated on.

I am using the default telegram config

Dev branch
Build: 5e70608

@Lntnam
Copy link
Author

Lntnam commented Aug 30, 2016

P.S I think this has caused my bot to teleport from wherever it was, to the initial location... RIP this account.

@rawgni
Copy link
Contributor

rawgni commented Aug 30, 2016

screen shot 2016-08-30 at 7 14 10 pm

might be the reason for the error

@Lntnam
Copy link
Author

Lntnam commented Aug 30, 2016

Okay, so it's telegram then.

Thank you and can close this.

@mjmadsen
Copy link
Contributor

@lntn How has everything be running otherwise.

@askovpen
Copy link
Contributor

i'll fix this exception tomorrow

@Lntnam
Copy link
Author

Lntnam commented Aug 30, 2016

@mjmadsen meaning?
If you're asking that if the bot runs fine otherwise, yes it is still running fine (thanks to the 20 secs auto reconnect). However I got teleported on the first exception.

@mjmadsen
Copy link
Contributor

@lntn Yeah, that's what I meant. Can I see the logs from the restarts? Curious why it's restarting so often for you.

@Lntnam
Copy link
Author

Lntnam commented Aug 30, 2016

@mjmadsen here you go

2016-08-30 17:25:25,711 [MoveToFort] [INFO] [moving_to_fort] Moving towards pokestop Fountain at Hung King's Shrine - 0.06km
2016-08-30 17:25:42,234 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:25:58,921 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:26:15,090 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=15.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:27:15,525 [       cli] [INFO] 
2016-08-30 17:27:15,525 [       cli] [INFO] Ran for 6:33:39
2016-08-30 17:27:15,526 [       cli] [INFO] Total XP Earned: 15160  Average: 2310.65/h
2016-08-30 17:27:15,526 [       cli] [INFO] Travelled 3.88km
2016-08-30 17:27:15,526 [       cli] [INFO] Visited 45 stops
2016-08-30 17:27:15,526 [       cli] [INFO] Encountered 85 pokemon, 83 caught, 56 released, 0 evolved, 0 never seen before ()
2016-08-30 17:27:15,526 [       cli] [INFO] Threw 115 pokeballs
2016-08-30 17:27:15,526 [       cli] [INFO] Earned 9120 Stardust
2016-08-30 17:27:15,526 [       cli] [INFO] Hatched eggs 1
2016-08-30 17:27:15,526 [       cli] [INFO] Next egg hatches in 3.80 km
2016-08-30 17:27:15,526 [       cli] [INFO] 
2016-08-30 17:27:15,526 [       cli] [INFO] Highest CP Pokemon: Pinsir [CP: 1314] [IV: 15/6/5] Potential: 0.58 
2016-08-30 17:27:15,526 [       cli] [INFO] Most Perfect Pokemon: Staryu [CP: 475] [IV: 14/13/15] Potential: 0.93 
Traceback (most recent call last):
  File "pokecli.py", line 764, in <module>
    main()
  File "pokecli.py", line 130, in main
    bot.tick()
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/__init__.py", line 644, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/cell_workers/telegram_task.py", line 36, in work
    for update in self.tbot.getUpdates(offset=self.update_id, timeout=10):
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 121, in decorator
    result = func(self, *args, **kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 1220, in getUpdates
    result = request.post(url, data, timeout=urlopen_timeout)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 235, in post
    **urlopen_kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 166, in _request_wrapper
    raise NetworkError('urllib3 HTTPError {0}'.format(error))
telegram.error.NetworkError: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x105b3e790>: Failed to establish a new connection: [Errno 65] EHOSTUNREACH',))
Tue Aug 30 17:27:15 ICT 2016 Pokebot  Stopped.
Press any button or wait 20 seconds to continue.
2016-08-30 17:27:36,943 [       cli] [INFO] PokemonGO Bot v1.0
2016-08-30 17:27:36,957 [       cli] [INFO] commit: 5e706086d2d5b23ba9966170d4b18ddaed26b6f2
2016-08-30 17:27:36,960 [       cli] [INFO] Configuration initialized
2016-08-30 17:27:37,064 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-30 17:27:37,065 [PokemonGoBot] [INFO] Favorite location found: bachdang ([u'10.775163', u'106.706552'])
2016-08-30 17:27:37,065 [PokemonGoBot] [INFO] [location_found] Location found: bachdang (10.775163, 106.706552, 8.0)
2016-08-30 17:27:37,065 [PokemonGoBot] [INFO] [position_update] Now at (10.775163, 106.706552, 8.0)
2016-08-30 17:27:37,065 [PokemonGoBot] [INFO] [login_started] Login procedure started.
2016-08-30 17:27:39,590 [PokemonGoBot] [INFO] [login_successful] Login successful.
2016-08-30 17:27:39,590 [PokemonGoBot] [INFO] Found encrypt.so! Platform: darwin encrypt.so directory: /Users/namle/Downloads/PokemonGo-Bot
2016-08-30 17:27:39,590 [PokemonGoBot] [INFO] 
2016-08-30 17:27:40,787 [PokemonGoBot] [INFO] Level: 23 (Next Level: 65445 XP) (Total: 494555 XP)
2016-08-30 17:27:40,787 [PokemonGoBot] [INFO] Pokemon Captured: 2099 | Pokestops Visited: 1745
2016-08-30 17:27:41,179 [PokemonGoBot] [INFO] 
2016-08-30 17:27:41,179 [PokemonGoBot] [INFO] --- JayElEee ---
2016-08-30 17:27:41,477 [PokemonGoBot] [INFO] Pokemon Bag: 67/250
2016-08-30 17:27:41,477 [PokemonGoBot] [INFO] Items: 147/350
2016-08-30 17:27:41,477 [PokemonGoBot] [INFO] Stardust: 114287 | Pokecoins: 0
2016-08-30 17:27:41,477 [PokemonGoBot] [INFO] PokeBalls: 24 | GreatBalls: 6 | UltraBalls: 10 | MasterBalls: 0
2016-08-30 17:27:41,478 [PokemonGoBot] [INFO] RazzBerries: 7 | BlukBerries: 0 | NanabBerries: 0
2016-08-30 17:27:41,478 [PokemonGoBot] [INFO] LuckyEgg: 5 | Incubator: 0 | TroyDisk: 5
2016-08-30 17:27:41,478 [PokemonGoBot] [INFO] Potion: 10 | SuperPotion: 10 | HyperPotion: 20 | MaxPotion: 0
2016-08-30 17:27:41,478 [PokemonGoBot] [INFO] Incense: 8 | IncenseSpicy: 0 | IncenseCool: 0
2016-08-30 17:27:41,478 [PokemonGoBot] [INFO] Revive: 40 | MaxRevive: 0
2016-08-30 17:27:41,478 [PokemonGoBot] [INFO] 
2016-08-30 17:27:41,479 [PokemonGoBot] [INFO] Pokemon:
2016-08-30 17:27:41,479 [PokemonGoBot] [INFO] #4 Charmander[1][24 candies]: (CP 441, IVCP 0.79, Level 16.5)
2016-08-30 17:27:41,479 [PokemonGoBot] [INFO] #10 Caterpie[1][374 candies]: (CP 183, IVCP 0.35, Level 19.5)
2016-08-30 17:27:41,480 [PokemonGoBot] [INFO] #13 Weedle[1][816 candies]: (CP 138, IVCP 0.53, Level 12.5)
2016-08-30 17:27:41,480 [PokemonGoBot] [INFO] #14 Kakuna[1][816 candies]: (CP 243, IVCP 0.4, Level 22.0)
2016-08-30 17:27:41,480 [PokemonGoBot] [INFO] #15 Beedrill[1][816 candies]: (CP 805, IVCP 0.89, Level 19.5)
2016-08-30 17:27:41,480 [PokemonGoBot] [INFO] #16 Pidgey[1][498 candies]: (CP 112, IVCP 0.44, Level 6.5)
2016-08-30 17:27:41,480 [PokemonGoBot] [INFO] #17 Pidgeotto[1][498 candies]: (CP 486, IVCP 0.35, Level 16.5)
2016-08-30 17:27:41,481 [PokemonGoBot] [INFO] #18 Pidgeot[1][498 candies]: (CP 1234, IVCP 0.9, Level 21.0)
2016-08-30 17:27:41,481 [PokemonGoBot] [INFO] #19 Rattata[1][450 candies]: (CP 353, IVCP 0.76, Level 24.0)
2016-08-30 17:27:41,481 [PokemonGoBot] [INFO] #20 Raticate[1][450 candies]: (CP 489, IVCP 0.94, Level 12.5)
2016-08-30 17:27:41,481 [PokemonGoBot] [INFO] #21 Spearow[1][20 candies]: (CP 198, IVCP 0.71, Level 11.5)
2016-08-30 17:27:41,481 [PokemonGoBot] [INFO] #22 Fearow[2][20 candies]: (CP 514, IVCP 0.9, Level 10.5) | (CP 180, IVCP 0.91, Level 4.0)
2016-08-30 17:27:41,481 [PokemonGoBot] [INFO] #27 Sandshrew[1][35 candies]: (CP 432, IVCP 0.8, Level 19.5)
2016-08-30 17:27:41,482 [PokemonGoBot] [INFO] #32 Nidoran M[1][163 candies]: (CP 533, IVCP 0.86, Level 24.0)
2016-08-30 17:27:41,482 [PokemonGoBot] [INFO] #39 Jigglypuff[1][26 candies]: (CP 494, IVCP 0.79, Level 19.5)
2016-08-30 17:27:41,482 [PokemonGoBot] [INFO] #43 Oddish[1][114 candies]: (CP 14, IVCP 0.44, Level 1.0)
2016-08-30 17:27:41,482 [PokemonGoBot] [INFO] #46 Paras[1][57 candies]: (CP 12, IVCP 0.83, Level 1.0)
2016-08-30 17:27:41,482 [PokemonGoBot] [INFO] #47 Parasect[1][57 candies]: (CP 1042, IVCP 0.97, Level 21.0)
2016-08-30 17:27:41,483 [PokemonGoBot] [INFO] #53 Persian[1][19 candies]: (CP 168, IVCP 0.91, Level 4.0)
2016-08-30 17:27:41,483 [PokemonGoBot] [INFO] #54 Psyduck[1][261 candies]: (CP 101, IVCP 0.4, Level 4.0)
2016-08-30 17:27:41,483 [PokemonGoBot] [INFO] #60 Poliwag[1][269 candies]: (CP 344, IVCP 0.62, Level 16.5)
2016-08-30 17:27:41,483 [PokemonGoBot] [INFO] #62 Poliwrath[1][269 candies]: (CP 1300, IVCP 0.88, Level 19.0)
2016-08-30 17:27:41,483 [PokemonGoBot] [INFO] #69 Bellsprout[1][191 candies]: (CP 137, IVCP 0.62, Level 5.0)
2016-08-30 17:27:41,483 [PokemonGoBot] [INFO] #73 Tentacruel[1][73 candies]: (CP 849, IVCP 0.3, Level 14.5)
2016-08-30 17:27:41,484 [PokemonGoBot] [INFO] #74 Geodude[1][37 candies]: (CP 201, IVCP 0.29, Level 9.5)
2016-08-30 17:27:41,484 [PokemonGoBot] [INFO] #77 Ponyta[1][23 candies]: (CP 472, IVCP 0.95, Level 11.5)
2016-08-30 17:27:41,484 [PokemonGoBot] [INFO] #79 Slowpoke[2][140 candies]: (CP 680, IVCP 0.9, Level 19.5) | (CP 217, IVCP 0.62, Level 6.5)
2016-08-30 17:27:41,484 [PokemonGoBot] [INFO] #80 Slowbro[1][140 candies]: (CP 1205, IVCP 0.69, Level 16.5)
2016-08-30 17:27:41,484 [PokemonGoBot] [INFO] #84 Doduo[1][103 candies]: (CP 474, IVCP 0.39, Level 24.0)
2016-08-30 17:27:41,485 [PokemonGoBot] [INFO] #85 Dodrio[1][103 candies]: (CP 980, IVCP 0.9, Level 19.5)
2016-08-30 17:27:41,485 [PokemonGoBot] [INFO] #86 Seel[1][16 candies]: (CP 244, IVCP 0.92, Level 7.5)
2016-08-30 17:27:41,485 [PokemonGoBot] [INFO] #92 Gastly[1][43 candies]: (CP 380, IVCP 0.69, Level 17.5)
2016-08-30 17:27:41,485 [PokemonGoBot] [INFO] #96 Drowzee[1][7 candies]: (CP 388, IVCP 0.88, Level 12.5)
2016-08-30 17:27:41,485 [PokemonGoBot] [INFO] #98 Krabby[1][395 candies]: (CP 313, IVCP 0.49, Level 16.5)
2016-08-30 17:27:41,485 [PokemonGoBot] [INFO] #99 Kingler[1][395 candies]: (CP 503, IVCP 0.8, Level 9.5)
2016-08-30 17:27:41,486 [PokemonGoBot] [INFO] #100 Voltorb[1][23 candies]: (CP 328, IVCP 0.21, Level 16.5)
2016-08-30 17:27:41,486 [PokemonGoBot] [INFO] #102 Exeggcute[1][156 candies]: (CP 629, IVCP 0.8, Level 21.0)
2016-08-30 17:27:41,486 [PokemonGoBot] [INFO] #103 Exeggutor[1][156 candies]: (CP 2035, IVCP 0.88, Level 24.0)
2016-08-30 17:27:41,486 [PokemonGoBot] [INFO] #104 Cubone[1][23 candies]: (CP 339, IVCP 0.93, Level 12.5)
2016-08-30 17:27:41,486 [PokemonGoBot] [INFO] #114 Tangela[1][107 candies]: (CP 300, IVCP 0.34, Level 6.5)
2016-08-30 17:27:41,486 [PokemonGoBot] [INFO] #116 Horsea[1][271 candies]: (CP 193, IVCP 0.82, Level 8.5)
2016-08-30 17:27:41,486 [PokemonGoBot] [INFO] #118 Goldeen[1][288 candies]: (CP 423, IVCP 0.83, Level 16.5)
2016-08-30 17:27:41,487 [PokemonGoBot] [INFO] #119 Seaking[1][288 candies]: (CP 631, IVCP 0.89, Level 11.5)
2016-08-30 17:27:41,487 [PokemonGoBot] [INFO] #120 Staryu[2][278 candies]: (CP 122, IVCP 0.88, Level 5.0) | (CP 475, IVCP 0.94, Level 17.5)
2016-08-30 17:27:41,487 [PokemonGoBot] [INFO] #121 Starmie[1][278 candies]: (CP 1236, IVCP 0.95, Level 19.5)
2016-08-30 17:27:41,487 [PokemonGoBot] [INFO] #123 Scyther[1][32 candies]: (CP 1316, IVCP 0.92, Level 22.0)
2016-08-30 17:27:41,488 [PokemonGoBot] [INFO] #127 Pinsir[3][342 candies]: (CP 29, IVCP 0.97, Level 1.0) | (CP 1151, IVCP 1.0, Level 19.5) | (CP 1424, IVCP 1.0, Level 24.0)
2016-08-30 17:27:41,488 [PokemonGoBot] [INFO] #129 Magikarp[1][78 candies]: (CP 26, IVCP 0.95, Level 4.0)
2016-08-30 17:27:41,488 [PokemonGoBot] [INFO] #130 Gyarados[1][78 candies]: (CP 1868, IVCP 0.95, Level 24.0)
2016-08-30 17:27:41,488 [PokemonGoBot] [INFO] #133 Eevee[1][63 candies]: (CP 348, IVCP 0.8, Level 12.5)
2016-08-30 17:27:41,488 [PokemonGoBot] [INFO] #134 Vaporeon[1][63 candies]: (CP 124, IVCP 0.96, Level 2.0)
2016-08-30 17:27:41,488 [PokemonGoBot] [INFO] #136 Flareon[1][63 candies]: (CP 1204, IVCP 0.98, Level 16.5)
2016-08-30 17:27:41,489 [PokemonGoBot] [INFO] #148 Dragonair[1][27 candies]: (CP 128, IVCP 0.94, Level 3.0)
2016-08-30 17:27:41,489 [PokemonGoBot] [INFO] 
2016-08-30 17:27:49,517 [RandomAlivePause] [INFO] [next_random_alive_pause] Next random alive pause at 18:04:19, for a duration of 0:02:22
2016-08-30 17:27:49,517 [RandomPause] [INFO] [next_random_pause] Next random pause at 17:44:19, for a duration of 0:03:32
2016-08-30 17:27:49,899 [RecycleItems] [INFO] [next_force_recycle] Next forced item recycle at 17:32:35
2016-08-30 17:27:49,901 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-30 17:27:49,902 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-30 17:27:49,902 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-30 17:27:49,902 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-30 17:27:49,902 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-30 17:27:49,902 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-30 17:27:49,902 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-30 17:27:50,310 [PokemonGoBot] [INFO] [bot_start] Starting bot...
2016-08-30 17:27:53,205 [       cli] [INFO] 
2016-08-30 17:27:53,205 [       cli] [INFO] Ran for 0:00:16
2016-08-30 17:27:53,205 [       cli] [INFO] Total XP Earned: 0  Average: 0.00/h
2016-08-30 17:27:53,205 [       cli] [INFO] Travelled 0.00km
2016-08-30 17:27:53,206 [       cli] [INFO] Visited 0 stops
2016-08-30 17:27:53,206 [       cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
2016-08-30 17:27:53,206 [       cli] [INFO] Threw 0 pokeballs
2016-08-30 17:27:53,206 [       cli] [INFO] Earned 0 Stardust
2016-08-30 17:27:53,206 [       cli] [INFO] Hatched eggs 0
2016-08-30 17:27:53,206 [       cli] [INFO] 
2016-08-30 17:27:53,206 [       cli] [INFO] Highest CP Pokemon: 
2016-08-30 17:27:53,206 [       cli] [INFO] Most Perfect Pokemon: 
Traceback (most recent call last):
  File "pokecli.py", line 764, in <module>
    main()
  File "pokecli.py", line 130, in main
    bot.tick()
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/__init__.py", line 644, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/cell_workers/telegram_task.py", line 36, in work
    for update in self.tbot.getUpdates(offset=self.update_id, timeout=10):
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 121, in decorator
    result = func(self, *args, **kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 1220, in getUpdates
    result = request.post(url, data, timeout=urlopen_timeout)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 235, in post
    **urlopen_kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 184, in _request_wrapper
    raise NetworkError('{0} ({1})'.format(message, resp.status))
telegram.error.NetworkError: Conflict: terminated by other long poll or webhook (409)
Tue Aug 30 17:27:53 ICT 2016 Pokebot  Stopped.
Press any button or wait 20 seconds to continue.
2016-08-30 17:28:13,956 [       cli] [INFO] PokemonGO Bot v1.0
2016-08-30 17:28:13,961 [       cli] [INFO] commit: 5e706086d2d5b23ba9966170d4b18ddaed26b6f2
2016-08-30 17:28:13,964 [       cli] [INFO] Configuration initialized
2016-08-30 17:28:14,054 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-30 17:28:14,055 [PokemonGoBot] [INFO] Favorite location found: bachdang ([u'10.775163', u'106.706552'])
2016-08-30 17:28:14,055 [PokemonGoBot] [INFO] [location_found] Location found: bachdang (10.775163, 106.706552, 8.0)
2016-08-30 17:28:14,055 [PokemonGoBot] [INFO] [position_update] Now at (10.775163, 106.706552, 8.0)
2016-08-30 17:28:14,055 [PokemonGoBot] [INFO] [login_started] Login procedure started.
2016-08-30 17:28:15,882 [PokemonGoBot] [INFO] [login_successful] Login successful.
2016-08-30 17:28:15,882 [PokemonGoBot] [INFO] Found encrypt.so! Platform: darwin encrypt.so directory: /Users/namle/Downloads/PokemonGo-Bot
2016-08-30 17:28:15,882 [PokemonGoBot] [INFO] 
2016-08-30 17:28:16,924 [PokemonGoBot] [INFO] Level: 23 (Next Level: 65445 XP) (Total: 494555 XP)
2016-08-30 17:28:16,925 [PokemonGoBot] [INFO] Pokemon Captured: 2099 | Pokestops Visited: 1745
2016-08-30 17:28:17,223 [PokemonGoBot] [INFO] 
2016-08-30 17:28:17,223 [PokemonGoBot] [INFO] --- JayElEee ---
2016-08-30 17:28:18,699 [PokemonGoBot] [INFO] Pokemon Bag: 67/250
2016-08-30 17:28:18,700 [PokemonGoBot] [INFO] Items: 147/350
2016-08-30 17:28:18,700 [PokemonGoBot] [INFO] Stardust: 114287 | Pokecoins: 0
2016-08-30 17:28:18,700 [PokemonGoBot] [INFO] PokeBalls: 24 | GreatBalls: 6 | UltraBalls: 10 | MasterBalls: 0
2016-08-30 17:28:18,700 [PokemonGoBot] [INFO] RazzBerries: 7 | BlukBerries: 0 | NanabBerries: 0
2016-08-30 17:28:18,700 [PokemonGoBot] [INFO] LuckyEgg: 5 | Incubator: 0 | TroyDisk: 5
2016-08-30 17:28:18,701 [PokemonGoBot] [INFO] Potion: 10 | SuperPotion: 10 | HyperPotion: 20 | MaxPotion: 0
2016-08-30 17:28:18,701 [PokemonGoBot] [INFO] Incense: 8 | IncenseSpicy: 0 | IncenseCool: 0
2016-08-30 17:28:18,701 [PokemonGoBot] [INFO] Revive: 40 | MaxRevive: 0
2016-08-30 17:28:18,701 [PokemonGoBot] [INFO] 
2016-08-30 17:28:18,702 [PokemonGoBot] [INFO] Pokemon:
2016-08-30 17:28:18,702 [PokemonGoBot] [INFO] #4 Charmander[1][24 candies]: (CP 441, IVCP 0.79, Level 16.5)
2016-08-30 17:28:18,703 [PokemonGoBot] [INFO] #10 Caterpie[1][374 candies]: (CP 183, IVCP 0.35, Level 19.5)
2016-08-30 17:28:18,703 [PokemonGoBot] [INFO] #13 Weedle[1][816 candies]: (CP 138, IVCP 0.53, Level 12.5)
2016-08-30 17:28:18,703 [PokemonGoBot] [INFO] #14 Kakuna[1][816 candies]: (CP 243, IVCP 0.4, Level 22.0)
2016-08-30 17:28:18,703 [PokemonGoBot] [INFO] #15 Beedrill[1][816 candies]: (CP 805, IVCP 0.89, Level 19.5)
2016-08-30 17:28:18,703 [PokemonGoBot] [INFO] #16 Pidgey[1][498 candies]: (CP 112, IVCP 0.44, Level 6.5)
2016-08-30 17:28:18,704 [PokemonGoBot] [INFO] #17 Pidgeotto[1][498 candies]: (CP 486, IVCP 0.35, Level 16.5)
2016-08-30 17:28:18,704 [PokemonGoBot] [INFO] #18 Pidgeot[1][498 candies]: (CP 1234, IVCP 0.9, Level 21.0)
2016-08-30 17:28:18,704 [PokemonGoBot] [INFO] #19 Rattata[1][450 candies]: (CP 353, IVCP 0.76, Level 24.0)
2016-08-30 17:28:18,704 [PokemonGoBot] [INFO] #20 Raticate[1][450 candies]: (CP 489, IVCP 0.94, Level 12.5)
2016-08-30 17:28:18,704 [PokemonGoBot] [INFO] #21 Spearow[1][20 candies]: (CP 198, IVCP 0.71, Level 11.5)
2016-08-30 17:28:18,705 [PokemonGoBot] [INFO] #22 Fearow[2][20 candies]: (CP 514, IVCP 0.9, Level 10.5) | (CP 180, IVCP 0.91, Level 4.0)
2016-08-30 17:28:18,705 [PokemonGoBot] [INFO] #27 Sandshrew[1][35 candies]: (CP 432, IVCP 0.8, Level 19.5)
2016-08-30 17:28:18,705 [PokemonGoBot] [INFO] #32 Nidoran M[1][163 candies]: (CP 533, IVCP 0.86, Level 24.0)
2016-08-30 17:28:18,705 [PokemonGoBot] [INFO] #39 Jigglypuff[1][26 candies]: (CP 494, IVCP 0.79, Level 19.5)
2016-08-30 17:28:18,705 [PokemonGoBot] [INFO] #43 Oddish[1][114 candies]: (CP 14, IVCP 0.44, Level 1.0)
2016-08-30 17:28:18,705 [PokemonGoBot] [INFO] #46 Paras[1][57 candies]: (CP 12, IVCP 0.83, Level 1.0)
2016-08-30 17:28:18,706 [PokemonGoBot] [INFO] #47 Parasect[1][57 candies]: (CP 1042, IVCP 0.97, Level 21.0)
2016-08-30 17:28:18,706 [PokemonGoBot] [INFO] #53 Persian[1][19 candies]: (CP 168, IVCP 0.91, Level 4.0)
2016-08-30 17:28:18,706 [PokemonGoBot] [INFO] #54 Psyduck[1][261 candies]: (CP 101, IVCP 0.4, Level 4.0)
2016-08-30 17:28:18,706 [PokemonGoBot] [INFO] #60 Poliwag[1][269 candies]: (CP 344, IVCP 0.62, Level 16.5)
2016-08-30 17:28:18,706 [PokemonGoBot] [INFO] #62 Poliwrath[1][269 candies]: (CP 1300, IVCP 0.88, Level 19.0)
2016-08-30 17:28:18,706 [PokemonGoBot] [INFO] #69 Bellsprout[1][191 candies]: (CP 137, IVCP 0.62, Level 5.0)
2016-08-30 17:28:18,707 [PokemonGoBot] [INFO] #73 Tentacruel[1][73 candies]: (CP 849, IVCP 0.3, Level 14.5)
2016-08-30 17:28:18,707 [PokemonGoBot] [INFO] #74 Geodude[1][37 candies]: (CP 201, IVCP 0.29, Level 9.5)
2016-08-30 17:28:18,707 [PokemonGoBot] [INFO] #77 Ponyta[1][23 candies]: (CP 472, IVCP 0.95, Level 11.5)
2016-08-30 17:28:18,707 [PokemonGoBot] [INFO] #79 Slowpoke[2][140 candies]: (CP 680, IVCP 0.9, Level 19.5) | (CP 217, IVCP 0.62, Level 6.5)
2016-08-30 17:28:18,707 [PokemonGoBot] [INFO] #80 Slowbro[1][140 candies]: (CP 1205, IVCP 0.69, Level 16.5)
2016-08-30 17:28:18,708 [PokemonGoBot] [INFO] #84 Doduo[1][103 candies]: (CP 474, IVCP 0.39, Level 24.0)
2016-08-30 17:28:18,708 [PokemonGoBot] [INFO] #85 Dodrio[1][103 candies]: (CP 980, IVCP 0.9, Level 19.5)
2016-08-30 17:28:18,708 [PokemonGoBot] [INFO] #86 Seel[1][16 candies]: (CP 244, IVCP 0.92, Level 7.5)
2016-08-30 17:28:18,708 [PokemonGoBot] [INFO] #92 Gastly[1][43 candies]: (CP 380, IVCP 0.69, Level 17.5)
2016-08-30 17:28:18,708 [PokemonGoBot] [INFO] #96 Drowzee[1][7 candies]: (CP 388, IVCP 0.88, Level 12.5)
2016-08-30 17:28:18,708 [PokemonGoBot] [INFO] #98 Krabby[1][395 candies]: (CP 313, IVCP 0.49, Level 16.5)
2016-08-30 17:28:18,709 [PokemonGoBot] [INFO] #99 Kingler[1][395 candies]: (CP 503, IVCP 0.8, Level 9.5)
2016-08-30 17:28:18,709 [PokemonGoBot] [INFO] #100 Voltorb[1][23 candies]: (CP 328, IVCP 0.21, Level 16.5)
2016-08-30 17:28:18,709 [PokemonGoBot] [INFO] #102 Exeggcute[1][156 candies]: (CP 629, IVCP 0.8, Level 21.0)
2016-08-30 17:28:18,709 [PokemonGoBot] [INFO] #103 Exeggutor[1][156 candies]: (CP 2035, IVCP 0.88, Level 24.0)
2016-08-30 17:28:18,709 [PokemonGoBot] [INFO] #104 Cubone[1][23 candies]: (CP 339, IVCP 0.93, Level 12.5)
2016-08-30 17:28:18,709 [PokemonGoBot] [INFO] #114 Tangela[1][107 candies]: (CP 300, IVCP 0.34, Level 6.5)
2016-08-30 17:28:18,710 [PokemonGoBot] [INFO] #116 Horsea[1][271 candies]: (CP 193, IVCP 0.82, Level 8.5)
2016-08-30 17:28:18,710 [PokemonGoBot] [INFO] #118 Goldeen[1][288 candies]: (CP 423, IVCP 0.83, Level 16.5)
2016-08-30 17:28:18,710 [PokemonGoBot] [INFO] #119 Seaking[1][288 candies]: (CP 631, IVCP 0.89, Level 11.5)
2016-08-30 17:28:18,710 [PokemonGoBot] [INFO] #120 Staryu[2][278 candies]: (CP 122, IVCP 0.88, Level 5.0) | (CP 475, IVCP 0.94, Level 17.5)
2016-08-30 17:28:18,710 [PokemonGoBot] [INFO] #121 Starmie[1][278 candies]: (CP 1236, IVCP 0.95, Level 19.5)
2016-08-30 17:28:18,710 [PokemonGoBot] [INFO] #123 Scyther[1][32 candies]: (CP 1316, IVCP 0.92, Level 22.0)
2016-08-30 17:28:18,711 [PokemonGoBot] [INFO] #127 Pinsir[3][342 candies]: (CP 29, IVCP 0.97, Level 1.0) | (CP 1151, IVCP 1.0, Level 19.5) | (CP 1424, IVCP 1.0, Level 24.0)
2016-08-30 17:28:18,711 [PokemonGoBot] [INFO] #129 Magikarp[1][78 candies]: (CP 26, IVCP 0.95, Level 4.0)
2016-08-30 17:28:18,711 [PokemonGoBot] [INFO] #130 Gyarados[1][78 candies]: (CP 1868, IVCP 0.95, Level 24.0)
2016-08-30 17:28:18,711 [PokemonGoBot] [INFO] #133 Eevee[1][63 candies]: (CP 348, IVCP 0.8, Level 12.5)
2016-08-30 17:28:18,711 [PokemonGoBot] [INFO] #134 Vaporeon[1][63 candies]: (CP 124, IVCP 0.96, Level 2.0)
2016-08-30 17:28:18,712 [PokemonGoBot] [INFO] #136 Flareon[1][63 candies]: (CP 1204, IVCP 0.98, Level 16.5)
2016-08-30 17:28:18,712 [PokemonGoBot] [INFO] #148 Dragonair[1][27 candies]: (CP 128, IVCP 0.94, Level 3.0)
2016-08-30 17:28:18,712 [PokemonGoBot] [INFO] 
2016-08-30 17:28:38,396 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=5.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:28:49,046 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=5.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:29:03,533 [urllib3.connectionpool] [WARNING] Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=5.0)",)': /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates
2016-08-30 17:29:11,644 [       cli] [INFO] 
2016-08-30 17:29:11,645 [       cli] [INFO] Ran for 0:00:58
2016-08-30 17:29:11,645 [       cli] [INFO] Total XP Earned: 0  Average: 0.00/h
2016-08-30 17:29:11,645 [       cli] [INFO] Travelled 0.00km
2016-08-30 17:29:11,645 [       cli] [INFO] Visited 0 stops
2016-08-30 17:29:11,645 [       cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
2016-08-30 17:29:11,645 [       cli] [INFO] Threw 0 pokeballs
2016-08-30 17:29:11,645 [       cli] [INFO] Earned 0 Stardust
2016-08-30 17:29:11,645 [       cli] [INFO] Hatched eggs 0
2016-08-30 17:29:11,645 [       cli] [INFO] 
2016-08-30 17:29:11,645 [       cli] [INFO] Highest CP Pokemon: 
2016-08-30 17:29:11,645 [       cli] [INFO] Most Perfect Pokemon: 
Traceback (most recent call last):
  File "pokecli.py", line 764, in <module>
    main()
  File "pokecli.py", line 119, in main
    bot = start_bot(bot,config)
  File "pokecli.py", line 87, in start_bot
    initialize_task(bot,config)
  File "pokecli.py", line 78, in initialize_task
    tree = TreeConfigBuilder(bot, config.raw_tasks).build()
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/tree_config_builder.py", line 79, in build
    instance = worker(self.bot, task_config)
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/base_task.py", line 23, in __init__
    self.initialize()
  File "/Users/namle/Downloads/PokemonGo-Bot/pokemongo_bot/cell_workers/telegram_task.py", line 29, in initialize
    self.update_id = self.tbot.getUpdates()[0].update_id
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 121, in decorator
    result = func(self, *args, **kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 1220, in getUpdates
    result = request.post(url, data, timeout=urlopen_timeout)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 235, in post
    **urlopen_kwargs)
  File "/Users/namle/Downloads/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 166, in _request_wrapper
    raise NetworkError('urllib3 HTTPError {0}'.format(error))
telegram.error.NetworkError: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot237540899:AAFUjvaS7eIaxCvo_YLLEB4rJj3ylUrUtyI/getUpdates (Caused by ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=5.0)",))
Tue Aug 30 17:29:11 ICT 2016 Pokebot  Stopped.
Press any button or wait 20 seconds to continue.

@mjmadsen mjmadsen changed the title Spotted these exceptions (suspect telegram) Telegram connection problems halting bot Aug 30, 2016
@mjmadsen mjmadsen added the Bug label Aug 30, 2016
@mjmadsen
Copy link
Contributor

Added as a bug and changed the title. We should really be able to have a work around that doesn't make the bot keep reconnecting because we can't connect to your telegram service.

@Lntnam
Copy link
Author

Lntnam commented Aug 30, 2016

Shall we also consider this: whenever the bot has to restart (i.e. after 20 secs), always set location_cache: true to prevent teleporting regardless the value in config file?

@mjmadsen
Copy link
Contributor

For the time being, I would disable telegram and social.

@mjmadsen
Copy link
Contributor

@lntn New fix working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants