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

Latest commit treats all pokemon it see as vip

Open mmixx opened this issue 10 years ago • 24 comments

Expected Behavior

All below 1200 CP or 0.9 IV will not be treated as VIP pokemon.

Actual Behavior

All pokemons it see... the bot treats it as VIP.

Your FULL config.json (remove your username, password, gmapkey and any other private info)

http://pastebin.com/rqhT89Hp

Output when issue occurred

[2016-09-16 02:43:18] [PokemonCatchWorker] [INFO] *A wild Venonat appeared!* (CP: 545) (NCP: 0.53) (Potential 0.64) (A/D/S 12/5/12)
[2016-09-16 02:43:21] [PokemonCatchWorker] [INFO] This is a VIP pokemon. Catch!!!
[2016-09-16 02:46:45] [PokemonCatchWorker] [INFO] *A wild Bellsprout appeared!* (CP: 268) (NCP: 0.24) (Potential 0.73) (A/D/S 14/9/10)
[2016-09-16 02:46:48] [PokemonCatchWorker] [INFO] This is a VIP pokemon. Catch!!!
[2016-09-16 02:50:29] [PokemonCatchWorker] [INFO] *A wild Venonat appeared!* (CP: 260) (NCP: 0.25) (Potential 0.51) (A/D/S 7/3/13)
[2016-09-16 02:50:32] [PokemonCatchWorker] [INFO] This is a VIP pokemon. Catch!!!

Steps to Reproduce

Update to the latest dev commit and run the bot.

Other Information

OS: Ubuntu 16.04

Branch: dev

Git Commit: a45943e

Python Version: 2.7.12

Any other relevant files/configs (eg: path files)

mmixx avatar Sep 15 '16 18:09 mmixx

I confirm

cowst avatar Sep 15 '16 20:09 cowst

same for me after pull from dev e209c2f82b17d418f6842772e1af8257a6a0868f

einszA avatar Sep 15 '16 22:09 einszA

Happening to me also. I'm looking for the cause but cannot pinpoint it.

javajohnHub avatar Sep 16 '16 00:09 javajohnHub

same here

clubza1 avatar Sep 16 '16 03:09 clubza1

Yup... every single one = VIP....

MerlionRock avatar Sep 16 '16 03:09 MerlionRock

same here

madzul avatar Sep 16 '16 03:09 madzul

i think it's because you did not specify charge_attack / fast attack. so it assumes that all type of attacks are VIP.

example from config.json.example

    "catch": {
      "Diglett": { "candy_threshold": 1, "catch_below_cp": 11, "catch_above_iv": 0, "logic": "and", "fast_attack": ["Scratch", "Mud Slap"] },
      "Horsea": { "candy_threshold": 1, "catch_below_cp": 11, "catch_above_iv": 0, "logic": "and", "fast_attack": ["Bubble"] },
      "// Example of catching Vaporeon only with Water Gun and Hydro Pump": {},
      "Vaporeon": { "catch_above_iv": 0.99, "charged_attack": ["Hydro Pump"], "fast_attack": ["Water Gun"]}
    },

rawgni avatar Sep 16 '16 04:09 rawgni

@rawgni why should we? isn't fast_/charge_attack is parameter in catch config? not in the vips?

madzul avatar Sep 16 '16 04:09 madzul

@madzul because the new code introduces that. the configuration in catch also affect VIP status.

@DBa2016 can you verify ? maybe it's better to move it separate/combine/do something to catch/vips section of the config

rawgni avatar Sep 16 '16 04:09 rawgni

Getting this error after latest commit:

Traceback (most recent call last):
  File "pokecli.py", line 841, in <module>
    main()
  File "pokecli.py", line 200, in main
    bot.tick()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 713, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/cell_workers/transfer_pokemon.py", line 30, in work
    self._release_pokemon_worst_in_group(group, pokemon_name)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/cell_workers/transfer_pokemon.py", line 59, in _release_pokemon_worst_in_group
    pokemon_name)
TypeError: 'NoneType' object is not iterable

db-coder avatar Sep 16 '16 04:09 db-coder

Getting the same error as @db-coder since the last update.

Traceback (most recent call last):
  File "pokecli.py", line 841, in <module>
    main()
  File "pokecli.py", line 200, in main
    bot.tick()
  File "/home/xx/Downloads/PokemonGo-Bot/pokemongo_bot/__init__.py", line 713, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/home/xx/Downloads/PokemonGo-Bot/pokemongo_bot/cell_workers/transfer_pokemon.py", line 30, in work
    self._release_pokemon_worst_in_group(group, pokemon_name)
  File "/home/xx/Downloads/PokemonGo-Bot/pokemongo_bot/cell_workers/transfer_pokemon.py", line 59, in _release_pokemon_worst_in_group
    pokemon_name)
TypeError: 'NoneType' object is not iterable

xty avatar Sep 16 '16 07:09 xty

#5473 fixed the TypeError for me! Thanks :thumbsup:

einszA avatar Sep 16 '16 08:09 einszA

Mines counting every pokemon as VIP as well.

Faithu avatar Sep 16 '16 08:09 Faithu

As far as I could see, it isn't the config you set the causes the bot to think "all" pokemons are VIP. I think it has to do with these lines:

catch_results['fa'] = ( len(pokemon_config.get('fast_attack', [])) == 0 or unicode(pokemon.fast_attack) in map(lambda x: unicode(x), pokemon_config.get('fast_attack', [])))
        catch_results['ca'] = ( len(pokemon_config.get('charged_attack', [])) == 0 or unicode(pokemon.charged_attack) in map(lambda x: unicode(x), pokemon_config.get('charged_attack', [])))

I haven't set the "fast_attack" or "charged_attack" in my config:

"catch": {
      "any": {"candy_threshold" : 400 ,"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
      "// Example of always catching Rattata:": {},
      "// Rattata": { "always_catch" : true }
    },
    "vips" : {
        "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate": {},
        "any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
        "Lapras": {},
        "Moltres": {},
        "Zapdos": {},
        "Articuno": {},

        "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
        "Mewtwo": {},
        "Dragonite": {},
        "Snorlax": {},
        "// Mew evolves to Mewtwo": {},
        "Mew": {},
        "Arcanine": {},
        "Vaporeon": {},
        "Gyarados": {},
        "Exeggutor": {},
        "Muk": {},
        "Weezing": {},
        "Flareon": {}
    }

Yes I catch all pokemon, but no it shouldn't be a VIP unless it's in my list OR is has high(ish) CP or IV. Shouldn't this

len(pokemon_config.get('fast_attack', [])) == 0

change to:

len(pokemon_config.get('fast_attack', [])) > 0

Wouldn't that check IF there is a fast_attack set?

davidakachaos avatar Sep 16 '16 08:09 davidakachaos

Additional observation: Pokémon transfer is now broken too, and it has similar syntax in the config.json file.

"release": {
      "any": {"release_below_cp": 1000, "release_below_iv": 0.9, "logic": "and"},
      "Pidgey": {"keep_best_iv": 35},
      "Weedle": {"keep_best_iv": 20},
      "Caterpie": {"keep_best_iv": 15},
      …
}

The first rule "any": {"release_below_cp": 1000, "release_below_iv": 0.9, "logic": "and"} is not taking effect. I suspect it's related to the problem in question.

xty avatar Sep 16 '16 15:09 xty

Yep... I confirm... transfer is broken too...

mmixx avatar Sep 16 '16 15:09 mmixx

Fixing VIP issue now

Gobberwart avatar Sep 17 '16 00:09 Gobberwart

Fixed in PR. Waiting on merge.

Gobberwart avatar Sep 17 '16 00:09 Gobberwart

There were two issues here:

  1. If you didn't have a specific setting in your catch (eg. "catch_above_ncp") the bot would treat it as if you did and always catch.
  2. Everything was a vip because the _is_vip function was calling the same faulty catch rules (for no apparent reason)

Gobberwart avatar Sep 17 '16 00:09 Gobberwart

last pull same problem all VIP

clubza1 avatar Sep 17 '16 01:09 clubza1