PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

[ISSUE] "TransferPokemon" task broken #5651

Closed ChrisHaPunkt closed 8 years ago

ChrisHaPunkt commented 8 years ago

Expected Behavior

 {
      "type": "TransferPokemon",
      "config": {
        "enabled": true,
        "min_free_slot": 5,
        "transfer_wait_min": 3,
        "transfer_wait_max": 5
      }
},

current pokemon bag 250/250 -> Should trigger the Transfer Pokemon Task

Actual Behavior

Will be completely skipped, no log entries, nothing.

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

{ "websocket_server": false, "heartbeat_threshold": 10, "location_cache": true, "enable_social": false, "live_config_update": { "enabled": false, "tasks_only": false }, "tasks": [ { "type": "TelegramTask", "config": { "enabled": false, "master": null, "alert_catch": [ "all " ] } }, { "//NOTE: T his task MUST be placed on the top of task list": {}, "type": "RandomAlivePause", "config": { "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:05:00", "max_interval": "01:30:00" } }, { "type": "HandleSoftBan" }, { "type": "RandomPause", "config": { "enabled": false, "min_duration": "00:00:10", "max_duration": "00:10:00", "min_interval": "00:10:00", "max_interval": "02:00:00" } }, { "type": "CompleteTutorial", "config": { "enabled": false, "// set a name": "", "nickname": "" } }, { "type": "CollectLevelUpReward", "config": { "collect_reward": true, "level_limit": -1 } }, { "type": "BuddyPokemon", "config": { "enabled": true, "buddy_list": "dratini, magikarp,pikachu", "best_in_family": true, "// candy_limit = 0 means no limit, so it will never change current buddy": {}, "candy_limit": 100, "// force_first_change = true will always change buddy at start removing current one": {}, "force_first_change": false, "buddy_change_wait_min": 3, "buddy_change_wait_max": 5, "min_interval": 120 } }, { "type": "IncubateEggs", "config": { "enabled": true, "infinite_longer_eggs_first": false, "breakable_longer_eggs_first": true, "min_interval": 120, "infinite": [ 2, 5, 10 ], "breakable": [ 2, 5, 10 ] } }, { "type": "UpdateLiveStats", "config": { "enabled": false, "min_interval": 10, "stats": [ "username", "uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited" ], "terminal_log": true, "terminal_title": true } }, { "type": "UpdateLiveInventory", "config": { "enabled": false, "min_interval": 120, "show_all_multiple_lines": false, "items": [ "pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg" ] } }, { "type": "ShowBestPokemon", "config": { "enabled": false, "min_interval": 60, "amount": 5, "order_by": "cp", "info_to_show": [ "cp", "ivcp", "dps", "hp" ] } }, { "type": "TransferPokemon", "config": { "enabled": true, "min_free_slot": 5, "transfer_wait_min": 3, "transfer_wait_max": 5 } }, { "type": "EvolvePokemon", "config": { "enabled": false, "evolve_list": "Rattata, Spearow, Tentacool, Goldeen, Caterpie, Weedle, Pidgey, Kakuna ", "donot_evolve_list": "Eevee", "first_evolve_by": "cp", "evolve_above_cp": 1, "evolve_above_iv": 0.8, "logic": "or", "min_evolve_speed": 25, "max_evolve_speed": 30, "min_pokemon_to_be_evolved": 1, "use_lucky_egg": false } }, { "type": "UseIncense", "config": { "use_incense": false, "use_order": [ "ordinary", "spicy", "cool", "floral" ] } }, { "type": "NicknamePokemon", "config": { "enabled": false, "nickname_above_iv": 0.9, "nickname_template": "{ivpct}{iv_ads}" } }, { "type": "RecycleItems", "config": { "enabled": true, "min_empty_space": 15, "max_balls_keep": 150, "max_potions_keep": 50, "max_berries_keep": 70, "max_revives_keep": 70, "item_filter": { "Pokeball": { "keep": 100 }, "Potion": { "keep": 10 }, "Super Potion": { "keep": 20 }, "Hyper Potion": { "keep": 30 }, "Revive": { "keep": 30 }, "Razz Berry": { "keep": 100 } }, "recycle_wait_min": 3, "recycle_wait_max": 5, "recycle_force": true, "recycle_force_min": "00:01:00", "recycle_force_max": "00:05:00" } }, { "type": "Sniper", "config": { "enabled": false, "mode": "social", "bullets": 1, "homing_shots": true, "special_iv": 100, "order": [ "missing", "vip", "priority" ], "sources": [ { "enabled": false, "url": "http://localhost:5000/raw_data", "timeout": 3, "key": "pokemons", "mappings": { "id": { "param": "pokemon_id" }, "name": { "param": "pokemon_name" }, "latitude": { "param": "latitude" }, "longitude": { "param": "longitude" }, "expiration": { "param": "disappear_time", "format": "milliseconds" } } }, { "enabled": false, "url": "https://pokewatchers.com/grab/", "timeout": 10, "mappings": { "iv": { "param": "iv" }, "id": { "param": "pid" }, "name": { "param": "pokemon" }, "latitude": { "param": "cords" }, "longitude": { "param": "cords" }, "expiration": { "param": "timeend", "format": "milliseconds" } } }, { "enabled": false, "url": "http://pokesnipers.com/api/v1/pokemon.json", "timeout": 10, "key": "results", "mappings": { "iv": { "param": "iv" }, "name": { "param": "name" }, "latitude": { "param": "coords" }, "longitude": { "param": "coords" }, "expiration": { "param": "until", "format": "utc" } } } ], "catch": { "Snorlax": 1000, "Dragonite": 1000, "Growlithe": 600, "Clefairy": 500, "Kabuto": 500, "Dratini": 500, "Dragonair": 500, "Mr. Mime": 500, "Magmar": 500, "Electabuzz": 500, "Tangela": 500, "Tauros": 500, "Primeape": 500, "Chansey": 500, "Pidgey": 100, "Caterpie": 100, "Weedle": 100 } } }, { "type": "CatchPokemon", "config": { "enabled": true, "catch_visible_pokemon": true, "catch_lured_pokemon": true, "min_ultraball_to_keep": 5, "berry_threshold": 0.35, "vip_berry_threshold": 0.9, "treat_unseen_as_vip": false, "daily_catch_limit": 800, "vanish_settings": { "consecutive_vanish_limit": 10, "rest_duration_min": "02:00:00", "rest_duration_max": "04:00:00" }, "catch_throw_parameters": { "excellent_rate": 0.1, "great_rate": 0.5, "nice_rate": 0.3, "normal_rate": 0.1, "spin_success_rate": 0.6, "hit_rate": 0.75 }, "catch_simulation": { "flee_count": 3, "flee_duration": 2, "catch_wait_min": 4, "catch_wait_max": 7, "berry_wait_min": 4, "berry_wait_max": 6, "changeball_wait_min": 5, "changeball_wait_max": 7, "newtodex_wait_min": 20, "newtodex_wait_max": 30 } } }, { "type": "SpinFort", "config": { "enabled": true, "spin_wait_min": 3, "spin_wait_max": 5, "daily_spin_limit": 1900 } }, { "type": "UpdateWebInventory", "config": { "enabled": true } }, { "type": "CampFort", "config": { "enabled": true, "max_distance": 2000, "min_forts_count": 2, "min_lured_forts_count": 1, "camping_time": 3600, "moving_time": 600 } }, { "type": "MoveToFort", "config": { "enabled": true, "lure_attraction": true, "lure_max_distance": 2000, "walker": "StepWalker", "log_interval": 5 } }, { "type": "FollowSpiral", "config": { "enabled": true, "diameter": 4, "step_size": 70 } } ], "map_object_cache_time": 5, "forts": { "avoid_circles": true, "max_circle_size": 50, "cache_recent_forts": true }, "pokemon_bag": { "// if 'show_at_start' is true, it will log all the pokemons in the bag (not eggs) at bot start": {}, "show_at_start": false, "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {}, "show_count": false, "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {}, "show_candies": false, "// 'pokemon_info' parameter define which info to show for each pokemon": {}, "// the available options are": {}, "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {}, "pokemon_info": [ "cp", "iv_pct" ] }, "walk_max": 3.16, "walk_min": 1.16, "alt_min": 500, "alt_max": 1000, "sleep_schedule": { "enabled": true, "enable_reminder": false, "reminder_interval": 600, "entries": [ { "time": "14:00", "duration": "1:30", "time_random_offset": "00:17", "duration_random_offset": "00:43", "wake_up_at_location": "54.315288, 10.134462" }, { "time": "19:42", "duration": "12:42", "time_random_offset": "00:34", "duration_random_offset": "00:34", "wake_up_at_location": "54.315288, 10.134461" } ] }, "gps_default_altitude": 8.0, "replicate_gps_xy_noise": false, "replicate_gps_z_noise": false, "gps_xy_noise_range": 0.000125, "gps_z_noise_range": 12.5, "debug": false, "test": false, "walker_limit_output": false, "health_record": false, "distance_unit": "km", "reconnecting_timeout": 15, "logging": { "color": true, "clean": false }, "catch": { "any": { "candy_threshold": 600, "catch_above_cp": 0, "catch_above_iv": 0, "logic": "or" }, "// Example of always catching Rattata:": {}, "// Rattata": { "always_catch": true } }, "release": { "any": { "release_below_cp": 300, "release_below_iv": 1, "logic": "or", "keep_best_cp": 1 }, "Eevee": { "keep_best_cp": 5 }, "Rattata": { "never_release": true }, "Spearow": { "never_release": true }, "Tentacool": { "never_release": true }, "Goldeen": { "never_release": true }, "Caterpie": { "never_release": true }, "Weedle": { "never_release": true }, "Pidgey": { "never_release": true }, "// Pidgey": { "keep_best_cp": 30 }, "// Caterpie": { "keep_best_cp": 30 }, "/ / Weedle": { "keep_best_cp": 30 }, "// Rattata": { "keep_best_cp": 10 }, "//Squirtle": { "keep_best_cp": 3 }, "//Bulbasaur": { "keep_best_cp": 3 }, "//Charmander": { "keep_best_cp": 3 }, "// Example of keeping 2 best (based on IV) Zubat:": {}, "// Zubat": { "keep_best_iv": 2 }, "// Keep no more than 3 best IV pokemon for every pokemon type": {}, "// any": { "keep_best_iv": 3 }, "// Discard all pokemon in bag except 100 pokemon with best CP": {}, "// all": { "keep_best_cp": 100 }, "// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {}, "//s Zubat": { "keep_best_cp": 2, "keep_best_iv": 3 }, "// Example of custom order of static criterion": {}, "//v Zubat": { "keep_best_custom": "iv, cp, hp_max", "amount": 2 } }, "vips": { "// Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate": {}, "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": {} }, "websocket": { "start_embedded_server": true, "server_url": "127.0.0.1:4000" } }

Output when issue occurred

http://pastebin.com/yr6u0BZZ

Steps to Reproduce

cant tell, seems to appear after my previous setup.sh -u. But my Bag wasn't full enough to trigger.

Other Information

OS: deb9

Branch: master Git Commit: fd495448a6393e886a74d846ad086e0fed45f986 Python Version: 2.7.9 Any other relevant files/configs (eg: path files)
ChrisHaPunkt commented 8 years ago

Even if i start from a clean config, no transfer at all with 245/250 and

{
      "type": "TransferPokemon",
      "config": {
        "enabled": true,
        "min_free_slot": 5,
        "transfer_wait_min": 3,
        "transfer_wait_max": 5
      }
},

or "min_free_slot": 20,

Jcolomar commented 8 years ago

Same error here:

"type": "PokemonOptimizer", "config": { "enabled": true, "min_slots_left": 5, "action_wait_min": 3, "action_wait_max": 5, "transfer": true, "evolve": true, "evolve_to_final": true, "evolve_time": 25, "evolve_for_xp": false, "evolve_only_with_lucky_egg": true, "evolve_count_for_lucky_egg": 1, "may_use_lucky_egg": false, "upgrade": true, "upgrade_level": 40, "rules": [ { "mode": "overall", "top": 1, "sort": ["-candy", "cp"], "evolve": false, "buddy": true }, { "mode": "by_family", "top": 2, "sort": ["iv", "dps_attack"], "upgrade": {"iv": 1}, "evolve": {"iv": 1} }, { "// For Pokemon of final evolution and with iv greater than 1, keep the best dps_attack": {}, "mode": "by_pokemon", "names": ["!with_next_evolution"], "top": 1, "sort": ["dps_attack"], "keep": {"iv": 1} } ] } },

Gobberwart commented 8 years ago

Just checked latest dev branch and transferpokemon is working as expected, given the rules I've supplied.

@ChrisHaPunkt The default config does not release anything until you configure release rules (near the bottom). That's by design for safety reasons.

I notice in your original config, you have specified to keep a lot of things. That is cumulative, so perhaps your bag is full of things you actually told the bot not to release, and it now can't make any more space? Hard to say without knowing what you actually have in your bag.

Gobberwart commented 8 years ago

Until recently, we had an issue with transferpokemon that meant things were being released when they shouldn't be. This issue was corrected. Perhaps your bot is now working properly and your rules need attention?

Here's my output from transferpokemon and optimizer, both transferring correctly:

[2016-09-25 06:59:28] [TransferPokemon] [INFO] Keeping best 2 Beedrill, based on ivcp
[2016-09-25 06:59:28] [TransferPokemon] [INFO] Kept Beedrill (CP: 1102, IV: 0.53, IVCP: 0.430330395154)
[2016-09-25 06:59:28] [TransferPokemon] [INFO] Kept Beedrill (CP: 558, IV: 0.84, IVCP: 0.842528784378)
[2016-09-25 06:59:29] [TransferPokemon] [INFO] Released Beedrill (CP: 1090, IV: 0.47, IVCP: 0.38) You now have 405 Weedle candies
[2016-09-25 06:59:33] [TransferPokemon] [INFO] Keeping best 2 Pidgeot, based on ivcp
[2016-09-25 06:59:33] [TransferPokemon] [INFO] Kept Pidgeot (CP: 637, IV: 0.8, IVCP: 0.808392136245)
[2016-09-25 06:59:33] [TransferPokemon] [INFO] Kept Pidgeot (CP: 977, IV: 0.8, IVCP: 0.759352091936)
[2016-09-25 06:59:33] [TransferPokemon] [INFO] Released Pidgeot (CP: 1601, IV: 0.4, IVCP: 0.32) You now have 368 Pidgey candies
[2016-09-25 06:59:39] [TransferPokemon] [INFO] Released Pidgeot (CP: 1630, IV: 0.49, IVCP: 0.42) You now have 369 Pidgey candies
[2016-09-25 06:59:43] [TransferPokemon] [INFO] Keeping best 2 Nidorino, based on ivcp
[2016-09-25 06:59:43] [TransferPokemon] [INFO] Kept Nidorino (CP: 767, IV: 0.89, IVCP: 0.891042312434)
[2016-09-25 06:59:43] [TransferPokemon] [INFO] Kept Nidorino (CP: 765, IV: 0.87, IVCP: 0.872766009717)
[2016-09-25 07:22:17] [PokemonOptimizer] [INFO] Pokemon Bag: 221 / 250
[2016-09-25 07:22:17] [PokemonOptimizer] [INFO] Transferring 3 Pokemon
[2016-09-25 07:22:18] [PokemonOptimizer] [INFO] Exchanged Butterfree [IV 0.78] [CP 104] [159 candies]
[2016-09-25 07:22:24] [PokemonOptimizer] [INFO] Exchanged Beedrill [IV 0.84] [CP 558] [289 candies]
[2016-09-25 07:22:29] [PokemonOptimizer] [INFO] Exchanged Beedrill [IV 0.11] [CP 340] [290 candies]
[2016-09-25 07:22:36] [PokemonOptimizer] [INFO] Pokemon Bag: 218 / 250
[2016-09-25 07:22:36] [PokemonOptimizer] [INFO] Evolving 7 Pokemon (the best)
[2016-09-25 07:22:36] [PokemonOptimizer] [INFO] Evolved Kakuna [IV 0.51] [CP 78] [241 candies] [+500 xp]
[2016-09-25 07:22:43] [PokemonOptimizer] [INFO] Evolved Pidgey [IV 0.76] [CP 255] [362 candies] [+500 xp]
[2016-09-25 07:22:49] [PokemonOptimizer] [INFO] Evolved Pidgeotto [IV 0.76] [CP 468] [313 candies] [+500 xp]
[2016-09-25 07:22:56] [PokemonOptimizer] [INFO] Evolved Pidgeotto [IV 0.62] [CP 348] [264 candies] [+500 xp]
[2016-09-25 07:23:02] [PokemonOptimizer] [INFO] Evolved Rattata [IV 0.64] [CP 406] [411 candies] [+500 xp]
[2016-09-25 07:23:10] [PokemonOptimizer] [INFO] Evolved Zubat [IV 0.69] [CP 96] [33 candies] [+500 xp]
[2016-09-25 07:23:16] [PokemonOptimizer] [INFO] Evolved Diglett [IV 0.51] [CP 206] [1 candies] [+500 xp]
[2016-09-25 07:23:22] [PokemonOptimizer] [INFO] Upgrading 5 Pokemon [936598 stardust]
[2016-09-25 07:23:23] [PokemonOptimizer] [INFO] Upgraded Butterfree [IV 0.24] [CP 920] [155 candies] [932598 stardust]
[2016-09-25 07:23:29] [PokemonOptimizer] [INFO] Upgraded Butterfree [IV 0.24] [CP 920] [151 candies] [928598 stardust]
[2016-09-25 07:23:34] [PokemonOptimizer] [INFO] Upgraded Butterfree [IV 0.24] [CP 920] [147 candies] [924098 stardust]
ChrisHaPunkt commented 8 years ago

Thanks for your answers. I am currently on latest master branch. As u see on my log output, there are no messages from the TransferPokemon worker at all. No "Keep xy" or "keep xy based on rule xz". It seems as would the task never been triggered.

As mentioned, I started also from a clean config with adjusting the release rule (any below 1 IV, but keep best 1 CP) and the task configured as stated in op. But there were no messages in log from this task too.

Can someone confirm that the task is actually working on latest master branch? @Gobberwart , are u on master branch?

ChrisHaPunkt commented 8 years ago

I cleaned up the release part in my config and it works again. I cannot tell what exactly did the fix.