PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

'should_throttle_retry' referenced before assignment in api_wrapper.py:112

Open CapCap opened this issue 10 years ago • 5 comments

File "/poke/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 112, in call if should_throttle_retry: UnboundLocalError: local variable 'should_throttle_retry' referenced before assignment

Other Information

OS: OSX Git Commit: 6ba5609c6151507b5b832a74e471b6b7b1a182c9 Python Version: 2.7.12

CapCap avatar Aug 03 '16 18:08 CapCap

I got this error too:

[14:31:59]  A Wild Drowzee appeared! [CP 441] [Potential 0.53]
[14:31:59] IV [Attack/Defense/Stamina] = [9/10/5]
[14:32:02] Using Pokeball (chance: 37.43%)... (111 left!)
[14:32:03]  Captured Drowzee! [CP 441] [Potential 0.53] [9/10/5] [+210 exp]
[14:32:08] Updated PokemonGo-Map position
[14:32:08]  Teleporting to Drowzee (0.43km)
[14:32:08]  Encounter pokemon
[14:32:11]  Teleporting back to previous location..
Traceback (most recent call last):
  File "pokecli.py", line 446, in <module>
    main()
  File "pokecli.py", line 88, in main
    report_summary(bot)
  File "pokecli.py", line 96, in report_summary
    metrics.capture_stats()
  File ".../PokemonGo-Bot/pokemongo_bot/metrics.py", line 76, in capture_stats
    response_dict = request.call()
  File ".../PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 112, in call
    if should_throttle_retry:
UnboundLocalError: local variable 'should_throttle_retry' referenced before assignment

Running commit 2f91fd0410eeda430aeb9cb956885eda8bf04e22 on dev.

Vvkmnn avatar Aug 03 '16 18:08 Vvkmnn

same issue here

ycczkl avatar Aug 03 '16 18:08 ycczkl

See https://github.com/PokemonGoF/PokemonGo-Bot/pull/2461

sciyoshi avatar Aug 03 '16 18:08 sciyoshi

I got this as well

Traceback (most recent call last):
  File "pokecli.py", line 446, in <module>
    main()
  File "pokecli.py", line 88, in main
    report_summary(bot)
  File "pokecli.py", line 96, in report_summary
    metrics.capture_stats()
  File "/home/slayslot/github/pogomain-dev/PokemonGo-Bot/pokemongo_bot/metrics.py", line 76, in capture_stats
    response_dict = request.call()
  File "/home/slayslot/github/pogomain-dev/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 112, in call
    if should_throttle_retry:
UnboundLocalError: local variable 'should_throttle_retry' referenced before assignment

But, retrying to run the script fixed it for me.

handasolo avatar Aug 03 '16 18:08 handasolo

Bug confirmed,

[01:19:39] Moving towards fort Flying Bowling, 0.09km left (attraction of lure 0.17km)
[01:19:51] Moving towards fort Flying Bowling, 0.08km left (attraction of lure 0.16km)
Traceback (most recent call last):
  File "pokecli.py", line 446, in <module>
    main()
  File "pokecli.py", line 88, in main
    report_summary(bot)
  File "pokecli.py", line 96, in report_summary
    metrics.capture_stats()
  File "c:\pokebot\PokemonGo-Bot-main\pokemongo_bot\metrics.py", line 76, in capture_stats
    response_dict = request.call()
  File "c:\pokebot\PokemonGo-Bot-main\pokemongo_bot\api_wrapper.py", line 112, in call
    if should_throttle_retry:
UnboundLocalError: local variable 'should_throttle_retry' referenced before assignment

aurizasalim avatar Aug 04 '16 02:08 aurizasalim