PokemonGoF / PokemonGo-Bot

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

Error: Gap of around 2 mins between every task #4790

Closed db-coder closed 8 years ago

db-coder commented 8 years ago

===============ISSUE SECTION===============

Expected Behavior

Bot should start normally without much lag.

Actual Behavior

Bot is taking a lot of time to do the tasks. Approx a gap of 2 mins between every task.

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

{
    "auth_service": "ptc",
    "username": "xxx",
    "password": "xxx",
    "location": "40.78267,-73.96525",
    "favorite_locations":[
        {"name": "Milan", "coords": "45.472849,9.177567"}
    ],
    "gmapkey": "xxx",
    "encrypt_location": "",
    "websocket_server": false,
    "heartbeat_threshold": 10,
    "enable_social": true,
    "live_config_update": {
      "enabled": false,
      "tasks_only": false
    },
    "tasks": [
      {
        "//NOTE: This 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": "pikachuluffy1"
        }
      },
      {
        "type": "CollectLevelUpReward",
        "config": {
          "collect_reward": true,
          "level_limit": -1
        }
      },
      {
        "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": 50,
          "stats": ["username", "uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
          "terminal_log": true,
          "terminal_title": true
        }
      },
      {
        "type": "UpdateLiveInventory",
        "config": {
          "enabled": true,
          "min_interval": 120,
          "show_all_multiple_lines": false,
          "items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
        }
      },
      {
        "type": "ShowBestPokemon",
        "config": {
          "enabled": true,
          "min_interval": 120,
          "amount": 5,
          "order_by": "cp",
          "info_to_show": ["cp", "ivcp"]
        }
      },
      {
        "type": "TransferPokemon",
        "config": {
          "enabled": true,
          "min_free_slot": 5,
          "transfer_wait_min": 3,
          "transfer_wait_max": 5
        }
      },
      {
        "type": "NicknamePokemon",
        "config": {
          "enabled": true,
          "nickname_above_iv": 0.9,
          "nickname_template": "{iv_pct}_{iv_ads}"
        }
      },
      {
        "type": "EvolvePokemon",
        "config": {
          "enabled": false,
          "evolve_all": "none",
          "first_evolve_by": "cp",
          "evolve_above_cp": 500,
          "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": 15,
          "max_balls_keep": 250,
          "max_potions_keep": 30,
          "max_berries_keep": 70,
          "max_revives_keep": 30,
          "item_filter": {
            "Pokeball":       { "keep" : 150 },
            "Greatball":      { "keep" : 100 },
            "Ultraball":      { "keep" : 90 },
            "Potion":         { "keep" : 5 },
            "Super Potion":   { "keep" : 5 },
            "Hyper Potion":   { "keep" : 5 },
            "Max Potion":     { "keep" : 30 },
            "Revive":         { "keep" : 10 },
            "Max Revive":     { "keep" : 30 },
            "Razz Berry":     { "keep" : 70 }
          },
          "recycle_wait_min": 3,
          "recycle_wait_max": 5,
          "recycle_force": true,
          "recycle_force_min": "00:01:00",
          "recycle_force_max": "00:15:00"
        }
      },
      {
        "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,
          "daily_catch_limit": 800,
          "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": 3,
            "catch_wait_max": 6,
            "berry_wait_min": 3,
            "berry_wait_max": 5,
            "changeball_wait_min": 3,
            "changeball_wait_max": 5,
            "newtodex_wait_min": 20, 
            "newtodex_wait_max": 30
          }
        }
      },
      {
        "type": "SpinFort",
        "config": {
          "enabled": true,
          "spin_wait_min": 3,
          "spin_wait_max": 5
        }
      },
      { "type": "UpdateWebInventory",
        "config": {
          "enabled": true
        }
      },
      {
        "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": true,
      "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {},
      "show_count": true,
      "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {},
      "show_candies": true,
      "// '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.16,
    "walk_min": 2.16,
    "alt_min": 500,
    "alt_max": 1000,
    "sleep_schedule": [
      {
        "time": "12:00",
        "duration": "5:30",
        "time_random_offset": "00:30",
        "duration_random_offset": "00:30",
        "wake_up_at_location": ""
      },
      {
        "time": "17:45",
        "duration": "3:00",
        "time_random_offset": "01:00",
        "duration_random_offset": "00:30",
        "wake_up_at_location": ""
      }
    ],
    "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": true,
    "location_cache": true,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "logging_color": true,
    "catch": {
      "any": {"candy_threshold" : 400 ,"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:": {},
      "// Rattata": {"always_release": true},
      "// Example of keeping 3 stronger (based on CP) Pidgey:": {},
      "Pidgey": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Rattata": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Zubat": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Krabby": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Weedle": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Poliwag": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Nidoran M": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Nidoran F": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Magikarp": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Staryu": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Goldeen": {"keep_best_cp": 2, "keep_best_iv": 1},
      "// Discard all pokemon in bag except 100 pokemon with best CP": {},
      "// all": {"keep_best_cp": 100},
      "// 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": 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": {}
    }
}

Output when issue occurred

2016-08-27 06:47:52,264 [       cli] [INFO] PokemonGO Bot v1.0
2016-08-27 06:47:52,269 [       cli] [INFO] commit: fa2025ff36899dd91641b03a18033beeecd072d5
2016-08-27 06:47:52,271 [       cli] [INFO] Configuration initialized
2016-08-27 06:47:52,272 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2016-08-27 06:47:52,272 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-08-27 06:47:52,276 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
2016-08-27 06:47:52,425 [SleepSchedule] [INFO] [next_sleep] Next sleep at 2016-08-27 11:57:41.425126
2016-08-27 06:50:00,021 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-27 06:52:07,233 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-27 06:52:07,233 [PokemonGoBot] [INFO] [location_found] Location found: 40.78267,-73.96525 (40.78267, -73.96525, 8.0)
2016-08-27 06:54:14,464 [PokemonGoBot] [INFO] [position_update] Now at (40.78267, -73.96525, 8.0)
2016-08-27 07:00:36,416 [PokemonGoBot] [INFO] [login_started] Login procedure started.
2016-08-27 07:02:47,973 [PokemonGoBot] [INFO] [login_successful] Login successful.
2016-08-27 07:04:55,232 [PokemonGoBot] [INFO] Found encrypt.so! Platform: linux2 encrypt.so directory: /home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot
2016-08-27 07:04:55,232 [PokemonGoBot] [INFO] 

Steps to Reproduce

Run the bot in the latest config

Other Information

OS: Ubuntu 15.04 Branch: dev Git Commit: fa2025ff36899dd91641b03a18033beeecd072d5 Python Version: Python 2.7.9

db-coder commented 8 years ago

It also shows this: 2016-08-27 07:26:20,352 [RandomAlivePause] [INFO] [next_random_alive_pause] Next random alive pause at 08:26:35, for a duration of 0:03:34 2016-08-27 07:28:27,585 [RandomPause] [INFO] [next_random_pause] Next random pause at 08:27:42, for a duration of 0:09:59 But I've not enabled Random Alive Pause or Random Pause in my config.

db-coder commented 8 years ago

The same code after running for some time gives this error:

Traceback (most recent call last):
  File "pokecli.py", line 746, in <module>
    main()
  File "pokecli.py", line 126, in main
    bot.tick()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 640, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/cell_workers/recycle_items.py", line 189, in work
    if ItemRecycler(self.bot, item_in_inventory, self.get_amount_to_recycle(item_in_inventory)).work() == WorkerResult.ERROR:
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/services/item_recycle_worker.py", line 39, in work
    self._emit_recycle_succeed()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/services/item_recycle_worker.py", line 94, in _emit_recycle_succeed
    'item': self.item_to_recycle.name,
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/base_task.py", line 35, in emit_event
    if (time.time() - self.last_log_time) > self.config.get('log_interval', 0):
AttributeError: 'ItemRecycler' object has no attribute 'last_log_time'
2016-08-27 07:52:02,020 [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
    response = self._open(req, data)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
    '_open', req)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python2.7/httplib.py", line 1048, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1088, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 1044, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 886, in _send_output
    msg += message_body
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte
2016-08-27 07:52:02,089 [sentry.errors.uncaught] [ERROR] [u"AttributeError: 'ItemRecycler' object has no attribute 'last_log_time'", u'  File "pokecli.py", line 746, in <module>', u'  File "pokecli.py", line 126, in main', u'  File "pokemongo_bot/__init__.py", line 640, in tick', u'  File "pokemongo_bot/cell_workers/recycle_items.py", line 189, in work', u'  File "pokemongo_bot/services/item_recycle_worker.py", line 39, in work', u'  File "pokemongo_bot/services/item_recycle_worker.py", line 94, in _emit_recycle_succeed', u'  File "pokemongo_bot/base_task.py", line 35, in emit_event']
Sat Aug 27 07:52:02 IST 2016 Pokebot  Stopped.
Press any button or wait 20 seconds to continue.
mjmadsen commented 8 years ago

Last post should be resolved with a recent merge to the dev branch.

db-coder commented 8 years ago

Getting this error now. Any ideas?

2016-08-27 12:26:42,273 [PokemonCatchWorker] [INFO] [pokemon_appeared] A wild Clefairy appeared! [CP 212] [NCP 0.18] [Potential 0.58] [A/D/S 7/15/4]
2016-08-27 12:31:05,473 [PokemonCatchWorker] [INFO] [threw_berry_failed] Unknown response when throwing berry: 2.
Gobberwart commented 8 years ago

I vaguely recall seeing another issue about failing to throw berries with unknown response. Sorry can't remember what the outcome was. Maybe search issues.

mjmadsen commented 8 years ago

@db-coder my guess it that the pokemon disappeard before the berry was thrown. Only other issue I could find with berries and unknown was merged a bit ago (#4290).

As to why there was a 4 minute gap between the pokemon appearing and an action, I do not know. I don't think running an older version of Ubuntu would cause such a thing (:P). Are you still seeing long delays between actions?

db-coder commented 8 years ago

Hi, I disabled enable-social and removed recylce_force and I'm not getting the delays now. Currently, my bot is not doing anything. It's just stuck here:

[2016-08-28 13:49:34] [next_random_alive_pause] Next random alive pause at 14:51:13, for a duration of 0:00:19
[2016-08-28 13:49:34] [next_random_pause] Next random pause at 15:42:19, for a duration of 0:00:10
[2016-08-28 13:49:37] [bot_start] Starting bot...
[2016-08-28 13:49:37] [level_up_reward] Received level up reward: []
[2016-08-28 13:49:38] [next_egg_incubates] Eggs incubating: [0.98/2.0 km, 1.88/5.0 km, 1.88/10.0 km] (Eggs left: 6, Incubating: 3)
[2016-08-28 13:49:41] [log_stats] pikachuluffy1 | Uptime : 0:00:10 | Earned 0 Stardust | +0 XP | 0 XP/h | Visited 0 stops
[2016-08-28 13:49:41] [show_inventory] Pokemon: 202/250 | Items: 311/350 | Pokeballs: 78 | GreatBalls: 85 | UltraBalls: 21 | RazzBerries: 76
[2016-08-28 13:49:41] [show_best_pokemon] [Snorlax, CP 1223] | [Pinsir, CP 925] | [Dodrio, CP 890] | [Scyther, CP 826] | [Golbat, CP 808] | [Rapidash, CP 725] | [Magmar, CP 720]
[2016-08-28 13:50:43] [log_stats] pikachuluffy1 | Uptime : 0:01:13 | Earned 0 Stardust | +0 XP | 0 XP/h | Visited 0 stops
[2016-08-28 13:51:38] [next_egg_incubates] Eggs incubating: [0.98/2.0 km, 1.88/5.0 km, 1.88/10.0 km] (Eggs left: 6, Incubating: 3)
[2016-08-28 13:51:42] [show_inventory] Pokemon: 202/250 | Items: 311/350 | Pokeballs: 78 | GreatBalls: 85 | UltraBalls: 21 | RazzBerries: 76
[2016-08-28 13:51:42] [show_best_pokemon] [Snorlax, CP 1223] | [Pinsir, CP 925] | [Dodrio, CP 890] | [Scyther, CP 826] | [Golbat, CP 808] | [Rapidash, CP 725] | [Magmar, CP 720]
[2016-08-28 13:51:46] [log_stats] pikachuluffy1 | Uptime : 0:02:17 | Earned 0 Stardust | +0 XP | 0 XP/h | Visited 0 stops
mjmadsen commented 8 years ago

Hm... Can you put up your new config? Sorry you're running into so many problems! Hopefully we'll get you going soon.

db-coder commented 8 years ago

My current config:

{
    "websocket_server": false,
    "heartbeat_threshold": 10,
    "enable_social": false,
    "live_config_update": {
      "enabled": false,
      "tasks_only": false
    },
    "tasks": [
      {
        "type": "TelegramTask",
        "config": {
          "enabled": false,
          "master": null,
          "alert_catch": ["all"]
        }
      },
      {
        "//NOTE: This task MUST be placed on the top of task list": {},
        "type": "RandomAlivePause",
        "config": {
          "enabled": true,
          "min_duration": "00:00:10",
          "max_duration": "00:00:30",
          "min_interval": "01:00:00",
          "max_interval": "01:30:00"
        }
      },
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "RandomPause",
        "config": {
          "enabled": true,
          "min_duration": "00:00:10",
          "max_duration": "00:00:11",
          "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": "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": true,
          "min_interval": 60,
          "stats": ["username", "uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
          "terminal_log": true,
          "terminal_title": true
        }
      },
      {
        "type": "UpdateLiveInventory",
        "config": {
          "enabled": true,
          "min_interval": 120,
          "show_all_multiple_lines": false,
          "items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries"]
        }
      },
      {
        "type": "ShowBestPokemon",
        "config": {
          "enabled": true,
          "min_interval": 120,
          "amount": 7,
          "order_by": "cp",
          "info_to_show": ["cp"]
        }
      },
      {
        "type": "TransferPokemon",
        "config": {
          "enabled": true,
          "min_free_slot": 1,
          "transfer_wait_min": 3,
          "transfer_wait_max": 5
        }
      },
      {
        "type": "NicknamePokemon",
        "config": {
          "enabled": true,
          "nickname_above_iv": 0.9,
          "nickname_template": "{iv_pct}_{iv_ads}"
        }
      },
      {
        "type": "EvolvePokemon",
        "config": {
          "enabled": false,
          "evolve_all": "none",
          "first_evolve_by": "cp",
          "evolve_above_cp": 500,
          "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": 5,
          "item_filter": {
            "Pokeball":       { "keep" : 60 },
            "Greatball":      { "keep" : 80 },
            "Ultraball":      { "keep" : 100 },
            "Potion":         { "keep" : 0 },
            "Super Potion":   { "keep" : 0 },
            "Hyper Potion":   { "keep" : 0 },
            "Max Potion":     { "keep" : 0 },
            "Revive":         { "keep" : 0 },
            "Max Revive":     { "keep" : 0 },
            "Razz Berry":     { "keep" : 70 }
          },
          "recycle_wait_min": 3,
          "recycle_wait_max": 5,
          "recycle_force_min": "00:01:00",
          "recycle_force_max": "00:05:00"
        }
      },
      {
        "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,
          "daily_catch_limit": 800,
          "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": 3,
            "catch_wait_max": 6,
            "berry_wait_min": 3,
            "berry_wait_max": 5,
            "changeball_wait_min": 3,
            "changeball_wait_max": 5,
            "newtodex_wait_min": 20, 
            "newtodex_wait_max": 30
          }
        }
      },
      {
        "type": "SpinFort",
        "config": {
          "enabled": true,
          "spin_wait_min": 3,
          "spin_wait_max": 5
        }
      },
      { "type": "UpdateWebInventory",
        "config": {
          "enabled": true
        }
      },
      {
        "type": "MoveToFort",
        "config": {
          "enabled": true,
          "lure_attraction": true,
          "lure_max_distance": 2000,
          "walker": "StepWalker",
          "log_interval": 5
        }
      },
      {
        "type": "FollowSpiral",
        "config": {
          "enabled": false,
          "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": 4.16,
    "walk_min": 2.16,
    "alt_min": 500,
    "alt_max": 1000,
    "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,
    "location_cache": false,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "logging": {
      "color": true,
      "show_datetime": true,
      "show_process_name": false,
      "show_log_level": false
    },
    "catch": {
      "any": {"candy_threshold" : 400 ,"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:": {},
      "// Rattata": {"always_release": true},
      "// Example of keeping 3 stronger (based on CP) Pidgey:": {},
      "// Pidgey": {"keep_best_cp": 3},
      "// 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 custom order of static criterion": {},
      "// Zubat": {"keep_best_custom": "iv, cp, hp_max", "amount":2},
      "Pidgey": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Rattata": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Zubat": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Krabby": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Weedle": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Poliwag": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Magikarp": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Staryu": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Caterpie": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Spearow": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Clefairy": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Abra": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Psyduck": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Eevee": {"keep_best_cp": 3, "keep_best_iv": 1},
      "Voltorb": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Slowpoke": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Magnemite": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Venonat": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Pinsir": {"keep_best_cp": 1, "keep_best_iv": 1},
      "Dratini": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Bulbasaur": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Squirtle": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Charmander": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Golbat": {"keep_best_cp": 1, "keep_best_iv": 1},
      "Paras": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Geodude": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Nidoran M": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Nidoran F": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Sandshrew": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Oddish": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Machop": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Growlithe": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Horsea": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Ekans": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Meowth": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Bellsprout": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Rhyhorn": {"keep_best_cp": 1, "keep_best_iv": 1},
      "Tauros": {"keep_best_cp": 1, "keep_best_iv": 1},
      "Tangela": {"keep_best_cp": 1, "keep_best_iv": 1},
      "Raticate": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Ponyta": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Goldeen": {"keep_best_cp": 2, "keep_best_iv": 1}
    },
    "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": {}
    }
}

Another error that I got recently:

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 1228, in update_web_location_worker
    self.update_web_location()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 694, in update_web_location
    cells = self.find_close_cells(*location)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 730, in find_close_cells
    response_dict = self.get_map_objects(lat, lng, timestamp, cellid)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 1283, in get_map_objects
    cell_id=cellid
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 137, in function
    return request.call()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 239, in call
    result = self._call()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 188, in _call
    return PGoApiRequest.call(self, signature)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 236, in call
    response = request.request(self._api_endpoint, self._req_method_list, self.get_position())
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 125, in request
    response = self._make_rpc(endpoint, request_proto)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 113, in _make_rpc
    http_response = self._session.post(endpoint, data=request_proto_serialized, timeout=30)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/sessions.py", line 518, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/sessions.py", line 617, in send
    r.content
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/models.py", line 741, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/models.py", line 667, in generate
    raise ChunkedEncodingError(e)
ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
db-coder commented 8 years ago

Another error that I'm getting now:

Traceback (most recent call last):
  File "pokecli.py", line 768, in <module>
    main()
  File "pokecli.py", line 119, in main
    bot = start_bot(bot,config)
  File "pokecli.py", line 86, in start_bot
    bot.start()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 124, in start
    init_inventory(self)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1256, in init_inventory
    _inventory = Inventory(bot)
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1108, in __init__
    self.refresh()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1118, in refresh
    self.update_web_inventory()
  File "/home/dibyendu/PokemonGo/PokemonGo-Bot-Dev/PokemonGo-Bot/pokemongo_bot/inventory.py", line 1138, in update_web_inventory
    json_inventory = json.load(infile)
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting object: line 1 column 8887 (char 8886)
Gobberwart commented 8 years ago

@db-coder That looks related to this #4841 which I'm working on now.

Quick-fix: Delete web/inventory-USERNAME.json and restart the bot.

Gobberwart commented 8 years ago

@db-coder Just out of interest (to help with debugging), I'm curious to know if you actually use the web interface, and if so was it open at the time?

db-coder commented 8 years ago

@Gobberwart I did try deleting the json files in web directory. It worked for some time. But after re-starting, it again stopped moving even after deleting the json files. Also, yes I started the web interface initially before getting that error but it didn't show me anything.

Gobberwart commented 8 years ago

@db-coder There are two different issues here. The json error should hopefully be addressed by a PR I've just submitted ( #4877 ). The huge pauses/gaps you're seeing between tasks... I really don't know what's going on there, it's as if python is just running incredibly slowly on your machine.

For example:

2016-08-27 06:50:00,021 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-27 06:52:07,233 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.

The bot really doesn't do much in here. A couple of file read/writes and settings but nothing that should take 2+ minutes to complete.

db-coder commented 8 years ago

@Gobberwart saw the PR. Hopefully, that should solve my problem :) Regarding the long gaps, I removed them by making enable_social false.

Gobberwart commented 8 years ago

I'm having difficulty understanding why enable_social should make any difference. I've tried enabling it on mine and I don't see the same issue. Very odd.

db-coder commented 8 years ago

even after the latest commit, bot is still not moving.

antistes commented 8 years ago

I have the same problem. Disable social removes the "lag" but crashes the bot then. I am on CentOS7.2 with python 2.7.5. Still run an older bot version (last week) without this problem.