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

Changes to config.json stop bot from launching

Open Meph88 opened this issue 10 years ago • 12 comments

After modifying config.json (taken from config.json.example and added my login details) the bot launches. If I add any lines like "tasks" (with extra paramaters working for others) or "Pidgey": {"never_capture": true} the bot will no longer launch until I take away the mods.

Please help, I want to be able to specify some paramaters like only keeping two top Zubat and so on.

Other Information

OS: OS X El Capitan 10.11.6

Meph88 avatar Jul 31 '16 15:07 Meph88

Please write the commit you're using, and the branch.

Pacane avatar Jul 31 '16 15:07 Pacane

Copy paste your config.json ;)

tim427 avatar Jul 31 '16 15:07 tim427

to test your config just paste it on http://jsonlint.com/

Nathanian avatar Jul 31 '16 19:07 Nathanian

Sorry, I don't know what commit I'm using or branch, only a noob for command line interactions and github so I haven't encountered these terms before. If you feel like explaining that would be really cool.

My config.json is like this:

{ "auth_service": "google", "username": "[email protected]", "password": "YOURPASSWORD", "location": "SOME LOCATION", "gmapkey": "AGMAPAPIKEY", "max_steps": 5, "mode": "all", "walk": 4.16, "debug": false, "test": false, "initial_transfer": 0, "location_cache": true, "distance_unit": "km", "item_filter": "101,102,103,104", "evolve_all": "NONE" }

But obviously with my info in the top few fields and this works well. Bot works and has success.

I tried to add some stuff like:

"Pidgey": {"never_capture": true}

or

{ // ... "tasks": [ { "type": "IncubateEggs", "config": { "longer_eggs_first": true } } ] // ... }

and I can no longer launch the bot. For example if I use:

{ "auth_service": "google", "username": "[email protected]", "password": "YOURPASSWORD", "location": "SOME LOCATION", "gmapkey": "AGMAPAPIKEY", "max_steps": 5, "mode": "all", "walk": 4.16, "debug": false, "test": false, "initial_transfer": 0, "location_cache": true, "distance_unit": "km", "item_filter": "101,102,103,104", "evolve_all": "NONE" "Pidgey": {"never_capture": true} }

My output is this:

Traceback (most recent call last): File "pokecli.py", line 220, in <module> main() File "pokecli.py", line 197, in main config = init_config() File "pokecli.py", line 64, in init_config load.update(json.load(data)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load **kw) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting , delimiter: line 20 column 5 (char 543)

I don't know how to fix.

Now I'm sure it's my own lack of know how that is the problem, I am just a novice and this stuff takes some learning so any help would be awesome.

Meph88 avatar Aug 01 '16 07:08 Meph88

Hi, i think you're using the master branch. To set those Tasks you have to use the developers version.

  1. On top of the page click on code (Next to Issues)
  2. A few centimetres under Code it says "Branch: master" click on that and select dev
  3. Make a new folder for you dev-bot or delete your previous Bot files
  4. Right-Click in that Folder "Open GIT bash here" type in:

git clone -b dev https://github.com/PokemonGoF/PokemonGo-Bot then cd PokemonGo-Bot then pip2 install -r requirements.txt then git submodule init then git submodule update

  1. Go in Configs Folder open the json config example file, it should now already have set a few Tasks. if you want a config file thats functioning and goes from one fort to the next one till your bag is full and catches Pokemon and hatches eggs on its way i can give you mine :)

Nathanian avatar Aug 01 '16 09:08 Nathanian

Seriously can't thank you enough for the help. Your config file would be great to use as a base then I can just put in my own extra rules and job done :) Thank you

Meph88 avatar Aug 01 '16 14:08 Meph88

apparaently since the new update my config file is not up to date, i will post one later when i updated my bot

Nathanian avatar Aug 01 '16 16:08 Nathanian

{ "auth_service": "google", "username": "YOUR_USERNAME", "password": "YOUR_PASSWORD", "location": "SOME_LOCATION", "gmapkey": "GOOGLE_MAPS_API_KEY", "tasks": [{ "type": "HandleSoftBan" }, { "type": "CollectLevelUpReward" }, { "type": "IncubateEggs", "config": { "longer_eggs_first": true } }, { "type": "TransferPokemon" }, { "type": "EvolveAll", "config": { "evolve_all": "NONE", "evolve_cp_min": 0, "evolve_speed": 20, "use_lucky_egg": false } }, { "type": "RecycleItems", "config": { "item_filter": { "Pokeball": { "keep": 100 }, "Greatball": { "keep": 70 }, "Ultraball": { "keep": 80 }, "Potion": { "keep": 0 }, "Super Potion": { "keep": 40 }, "Hyper Potion": { "keep": 30 }, "Revive": { "keep": 30 }, "Razz Berry": { "keep": 50 } } } }, { "type": "CatchVisiblePokemon" }, { "type": "CatchLuredPokemon" }, { "type": "SpinFort" }, { "type": "MoveToFort" }

],
"max_steps": 5,
"forts": {
    "avoid_circles": true,
    "max_circle_size": 50
},
"websocket_server": false,
"walk": 11.16,
"action_wait_min": 1,
"action_wait_max": 4,
"debug": false,
"test": false,
"health_record": true,
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"evolve_captured": "NONE",
"catch_randomize_reticle_factor": 1.0,
"catch_randomize_spin_factor": 1.0,
"catch": {
    "any": {
        "catch_above_cp": 0,
        "catch_above_iv": 0,
        "logic": "or"
    },
    "// Example of always catching Rattata:": {},
    "// Rattata": {
        "always_catch": true
    }
},
    "release": {
        "Magikarp": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Dratini": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Dragonair": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Eevee": {
            "keep_best_cp": 3,
            "keep_best_iv": 0
        },
        "Electabuzz": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Jynx": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Goldeen": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Horsea": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Krabby": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Hypno": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Gastly": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Haunter": {
            "keep_best_cp": 2,
            "keep_best_iv": 0
        },
        "Shellder": {
            "keep_best_cp": 3,
            "keep_best_iv": 0
        },
        "Cloyster": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Magnemite": {
            "keep_best_cp": 2,
            "keep_best_iv": 0
        },
        "Abra": {
            "keep_best_cp": 2,
            "keep_best_iv": 0
        },
        "Poliwag": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Golbat": {
            "keep_best_cp": 2,
            "keep_best_iv": 0
        },
        "Zubat": {
            "keep_best_cp": 3,
            "keep_best_iv": 0
        },
        "Jigglypuff": {
            "keep_best_cp": 2,
            "keep_best_iv": 0
        },
        "Fearow": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Spearow": {
            "keep_best_cp": 4,
            "keep_best_iv": 0
        },
        "Raticate": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Pidgeotto": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Pidgey": {
            "keep_best_cp": 5,
            "keep_best_iv": 0
        },
        "Rattata": {
            "keep_best_cp": 5,
            "keep_best_iv": 0
        },
        "Bellsprout": {
            "keep_best_cp": 2,
            "keep_best_iv": 0
        },
        "Seel": {
            "keep_best_cp": 10,
            "keep_best_iv": 0
        },
        "Magmar": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "Seadra": {
            "keep_best_cp": 1,
            "keep_best_iv": 0
        },
        "any": {
            "keep_best_cp": 5,
            "keep_best_iv": 0
        },
        "// Example of always releasing Rattata:": {},
        "// Rattata": {
            "always_release": true
        },
        "// Example of keeping 3 stronger (based on CP) Pidgey:": {},
        "// Pidgey": {
            "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
        }
    },
    "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": {}

    }
}

}

Nathanian avatar Aug 01 '16 16:08 Nathanian

you should modify the item filter if your bag is not at a max capacity of 450, because the bot stops working if the bag is nearly full, so if you have the normal capacity of 350 use lower max-numbers for the items

Nathanian avatar Aug 01 '16 16:08 Nathanian

You are my hero, all working. Any idea what the name is for the Nidorans? I thought it would be Nidoranm and Nidoranf but for "evolve_all": This doesn't seem to be working.

Meph88 avatar Aug 03 '16 13:08 Meph88

@Nathanian "f you want a config file thats functioning and goes from one fort to the next one till your bag is full and catches Pokemon and hatches eggs on its way i can give you mine :)" I would aprreciate it, run out of pokeballs every time..

belinux avatar Aug 03 '16 14:08 belinux

@Meph88 its Nidoran M and Nidoran F

Nathanian avatar Aug 03 '16 17:08 Nathanian