-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Bug]"RandomPause" stops refresh /data/last-location-User_Name.json #4682
Comments
Just tested this and took a gander at the code. Should be updating fine. Are you having problems still? |
I see that you have added "RandomAlivePause". |
Yeah, RandomAlivePause won't log you out. I like the option. |
@maxprzemo Working properly now? |
@mjmadsen ' Edit: |
PR submitted #4740 |
Merge is on dev. Please try. If it does not work, please create a new issue. |
Expected Behavior
Running a web interface using the "Random Pause".
Correct refresh the file /data/last-location-User_Name.json after using "RandomPause"
Actual Behavior
"RandomPause" will stop the refresh /data/last-location-User_Name.json
After resuming activity the file no longer refreshes.
Web interface no longer show the position of the bot on the map.
Restart bot takes us to the last saved position (A very dangerous situation, teleport on a map).
FULL config.json (remove username, password, gmapkey and any other private info)
{
"auth_service": "ptc",
"username": "XXXXXXX",
"password": "XXXXXXXXXX",
"location": "XXXXXXXXXXX",
"gmapkey": "XXXXXXXXXXXXXX",
"encrypt_location": "",
"websocket_server": false,
"heartbeat_threshold": 10,
"enable_social": false,
"tasks": [
{
"type": "HandleSoftBan"
},
{
"type": "SleepSchedule",
"config": {
"enabled": false,
"time": "22:54",
"duration":"7:46",
"time_random_offset": "00:24",
"duration_random_offset": "00:43",
"wake_up_at_location": ""
}
},
{
"type": "RandomPause",
"config": {
"enabled": true,
"min_duration": "00:01:00",
"max_duration": "00:05:00",
"min_interval": "00:10:00",
"max_interval": "00:30:00"
}
},
{
"type": "CompleteTutorial",
"config": {
"enabled": false,
"// set a name": "",
"nickname": ""
}
},
{
"type": "CollectLevelUpReward"
},
{
"type": "IncubateEggs",
"config": {
"enabled": true,
"longer_eggs_first": true,
"min_interval": 120,
"infinite": [2,5,10],
"breakable": [2,5,10]
}
},
{
"type": "UpdateLiveStats",
"config": {
"enabled": true,
"min_interval": 30,
"stats": ["uptime", "km_walked", "stardust_earned", "pokemon_caught", "captures_per_hour", "stops_visited", "xp_earned", "xp_per_hour"],
"terminal_log": true,
"terminal_title": false
}
},
{
"type": "UpdateLiveInventory",
"config": {
"enabled": true,
"min_interval": 30,
"show_all_multiple_lines": false,
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
"type": "TransferPokemon",
"config": {
"enabled": true,
"min_free_slot": 999,
"transfer_wait_min": 5,
"transfer_wait_max": 8
}
},
{
"type": "NicknamePokemon",
"config": {
"enabled": false,
"nickname_above_iv": 0.9,
"nickname_template": "{iv_pct}_{iv_ads}"
}
},
{
"type": "EvolvePokemon",
"config": {
"enabled": true,
"evolve_all": "none",
"first_evolve_by": "cp",
"evolve_above_cp": 10,
"evolve_above_iv": 0.8,
"logic": "or",
"min_evolve_speed": 25,
"max_evolve_speed": 30,
"use_lucky_egg": false
}
},
{
"type": "RecycleItems",
"config": {
"enabled": true,
"min_empty_space": 30,
"max_balls_keep": 150,
"max_potions_keep": 70,
"max_berries_keep": 70,
"max_revives_keep": 70,
"item_filter": {
"Pokeball": { "keep" : 80 },
"Greatball": { "keep" : 50 },
"Potion": { "keep" : 10 },
"Super Potion": { "keep" : 20 },
"Hyper Potion": { "keep" : 30 },
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 50 }
},
"recycle_wait_min": 5,
"recycle_wait_max": 8
}
},
{
"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": true,
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.4,
"hit_rate": 0.75
},
"catch_simulation": {
"flee_count": 3,
"flee_duration": 2,
"catch_wait_min": 3,
"catch_wait_max": 6,
"berry_wait_min": 3,
"berry_wait_max": 5,
"changeball_wait_min": 3,
"changeball_wait_max": 5
}
}
},
{
"type": "SpinFort",
"config": {
"enabled": true,
"spin_wait_min": 5,
"spin_wait_max": 10
}
},
{
"type": "FollowPath",
"config": {
"enabled": true,
"walker": "PolylineWalker",
"path_mode": "loop",
"path_start_mode": "first",
"path_file": "/home/XXXXXXX/PokemonGo-Bot/configs/XXXXXXX.json",
"number_lap": 1,
"timer_restart_min": "00:10:00",
"timer_restart_max": "00:40:00"
}
}
],
"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": true,
"// 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": 4.15,
"walk_min": 2.67,
"alt_min": 114,
"alt_max": 130,
"gps_default_altitude": 124.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,
"health_record": false,
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"logging_color": true,
"daily_catch_limit": 500,
"catch": {
"any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
"// Example of always catching Rattata:": {},
"// Rattata": { "always_catch" : true }
},
"release": {
"any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
"// Example of always releasing Rattata:": {},
"Bellsprout": {"keep_best_cp": 3},
"Caterpie": {"keep_best_cp": 5},
"// Example of keeping 3 stronger (based on CP) Pidgey:": {},
"Drowzee": {"keep_best_cp": 3, "keep_best_iv": 3},
"Eevee": {"keep_best_cp": 3, "keep_best_iv": 3},
"Hypno": {"keep_best_cp": 3, "keep_best_iv": 3},
"Gastly": {"keep_best_cp": 3},
"Nidoran M": {"keep_best_cp": 3},
"Nidoran F": {"keep_best_cp": 3},
"Horsea": {"keep_best_cp": 3},
"Jynx": {"keep_best_cp": 3},
"Magikarp": {"keep_best_cp": 3},
"Magnemite": {"keep_best_cp": 3},
"Meowth": {"keep_best_cp": 3},
"Paras": {"keep_best_cp": 3},
"Pidgeotto": {"keep_best_cp": 3},
"Pidgey": {"keep_best_cp": 12},
"Pidgeot": {"keep_best_cp": 3},
"Psyduck": {"keep_best_cp": 3},
"Raticate": {"keep_best_cp": 3},
"Krabby": {"keep_best_cp": 3},
"Oddish": {"keep_best_cp": 3},
"Rattata": {"keep_best_cp": 8},
"Spearow": {"keep_best_cp": 5},
"Seel": {"keep_best_cp": 3},
"Shellder": {"keep_best_cp": 3},
"Squirtle": {"keep_best_cp": 3},
"Tentacool": {"keep_best_cp": 3},
"Venonat": {"keep_best_cp": 3},
"Weedle": {"keep_best_cp": 5},
"Zubat": {"keep_best_cp": 8},
"Fearow": {"keep_best_cp": 3},
"// Example of keeping 2 stronger (based on IV) Zubat:": {},
"// Zubat": {"keep_best_iv": 2},
"// Also, it is working with any": {},
"// any": {"keep_best_iv": 3},
"// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
"// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3},
"// Example of custom order of static criterion": {},
"// 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!": {},
"any": {"catch_above_cp": 500, "catch_above_iv": 0.8, "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": {},
"Electabuzz": {},
"Eevee": {},
"Omanyte": {},
"Ivysaur": {},
"Venusaur": {},
"Charmander": {},
"Charmeleon": {},
"Charizard": {},
"Wartortle": {},
"Blastoise": {},
"Metapod": {},
"Butterfree": {},
"Kakuna": {},
"Beedrill": {},
"Pidgeot": {},
"Fearow": {},
"Ekans": {},
"Arbok": {},
"Pikachu": {},
"Raichu": {},
"Sandslash": {},
"Nidoqueen": {},
"Nidorino": {},
"Nidoking": {},
"Clefable": {},
"Vulpix": {},
"Ninetales": {},
"Gloom": {},
"Vileplume": {},
"Venomoth": {},
"Dugtrio": {},
"Persian": {},
"Golduck": {},
"Primeape": {},
"Growlithe": {},
"Poliwhirl": {},
"Poliwrath": {},
"Kadabra": {},
"Alakazam": {},
"Machoke": {},
"Machamp": {},
"Weepinbell": {},
"Victreebel": {},
"Tentacruel": {},
"Graveler": {},
"Golem": {},
"Ponyta": {},
"Rapidash": {},
"Slowbro": {},
"Magneton": {},
"Dodrio": {},
"Dewgong": {},
"Cloyster": {}
}
}
Possible solution
The error is probably somewhere in the file /PokemonGo-Bot/pokemongo_bot/cell_workers/random_pause.py
Which does not start all activity after the break.
Other Information
OS:
Debian 8.5
Branch:
dev
The text was updated successfully, but these errors were encountered: