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

cant get latest dev to run ValueError: Expecting , delimiter: line 16 column 5 (char 368)

Open ghost opened this issue 10 years ago • 9 comments

Expected Behavior

start bot upon C:\python27\python pokecli.py -cf config.json

Actual Behavior

giving error

C:\pythonbot dev neu\PokemonGo-Bot-dev>C:\python27\python pokecli.py -cf config.json Traceback (most recent call last): File "pokecli.py", line 219, in main() File "pokecli.py", line 196, in main config = init_config() File "pokecli.py", line 60, in init_config load.update(json.load(data)) File "C:\python27\lib\json__init__.py", line 291, in load **kw) File "C:\python27\lib\json__init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\python27\lib\json\decoder.py", line 380, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting , delimiter: line 16 column 5 (char 368)

Steps to Reproduce

maybe its about my config.json. it looks like this: { "auth_service": "ptc", "username": "_", "password": "_***", "location": "SOME LOCATION", "gmapkey": "AGMAPAPIKEY", "max_steps": 20, "mode": "all", "walk": 4.16, "debug": false, "test": false, "initial_transfer": 1, "location_cache": true, "distance_unit": "km", "item_filter": "101,102,103,104" "evolve_all", false, "evolve_captured", false }

Other Information

OS: win7 latest dev commit

Thanks a lot!!

ghost avatar Jul 24 '16 11:07 ghost

changed the config to be closer to the default one.

Config:

{ "auth_service": "ptc", "username": "**********", "password": "**", "location": "Central Park, New York", "gmapkey": "AIzaSyDqphcbnlFBm0**********************", "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" }

Error is now:

C:\pythonbot dev neu\PokemonGo-Bot-dev>C:\python27\python pokecli.py -cf config.json Traceback (most recent call last): File "pokecli.py", line 219, in main() File "pokecli.py", line 196, in main config = init_config() File "pokecli.py", line 173, in init_config config.release_config.update(json.load(data)) File "C:\python27\lib\json__init__.py", line 291, in load **kw) File "C:\python27\lib\json__init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

ghost avatar Jul 24 '16 11:07 ghost

"evolve_all", false, "evolve_captured", false

Not commas! Colon

Tekill avatar Jul 24 '16 11:07 Tekill

Use https://jsonformatter.curiousconcept.com/ for json validation

Tekill avatar Jul 24 '16 11:07 Tekill

yeah. I now removed evolve options completely in config. Jsonformatter site says: "Valid JSON (RFC 4627)".

Stilkl getting ValueError: No JSON object could be decoded.

ghost avatar Jul 24 '16 11:07 ghost

config.release_config.update(json.load(data)) Something wrong with release_config.json

Tekill avatar Jul 24 '16 11:07 Tekill

can you get this working by just adding the params to the CLI directly ?

Fak3Tales avatar Jul 24 '16 11:07 Fak3Tales

thank you @Tekill there was a typo i release_config. its running now. couldn't get the evolve params to work, though..

ghost avatar Jul 24 '16 11:07 ghost

for the record: there was a , missing at the end of the itemfilter

Aiyubi avatar Jul 24 '16 12:07 Aiyubi

you're right.

but the real problem was in the release config.

it looked like this:

        "Vileplume"

] } }

but has to look like this:

        "Vileplume"]
}

}

ghost avatar Jul 24 '16 12:07 ghost