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

error: argument -a/--auth_service is required

Open PraeceptorXS opened this issue 10 years ago • 19 comments

Expected Behavior

Bot to launch after entering python pokecli.py in terminal

Actual Behavior

Terminal returns error message (PokemonGo-Bot) Bens-MBP-2:PokemonGo-Bot BenSun$ python pokecli.py -cf configs/config.json usage: pokecli.py [-h] [-cf CONFIG] -a AUTH_SERVICE [-u USERNAME] [-p PASSWORD] [-l LOCATION] [-lc LOCATION_CACHE] [-m MODE] [-w WALK] [-k GMAPKEY] [-ms MAX_STEPS] [-it INITIAL_TRANSFER] [-d DEBUG] [-t TEST] [-du DISTANCE_UNIT] [-if ITEM_FILTER] [-ev EVOLVE_ALL] [-ec EVOLVE_CAPTURED] pokecli.py: error: argument -a/--auth_service is required

Steps to Reproduce

screen shot 2016-07-28 at 10 17 45 am ### Other Information

OS: OSX Sierra Beta

PraeceptorXS avatar Jul 28 '16 15:07 PraeceptorXS

Does your config.json have the "auth_service" value filled in?

Vvkmnn avatar Jul 28 '16 15:07 Vvkmnn

Yeah. Here is a pic of it screen shot 2016-07-28 at 10 28 25 am

PraeceptorXS avatar Jul 28 '16 15:07 PraeceptorXS

Hmm.

Sorry, but I can't tell from the screencap; is there a comma after auth_service" (and every other JSON entry)?

Like the following:

    "auth_service": "google",
    "username": "[email protected]",
    "password": "somepassword",
    "location": "43.639557, -79.375932",
    "gmapkey": "somekey",

Vvkmnn avatar Jul 28 '16 15:07 Vvkmnn

You're missing the comma lol.

sangwon04 avatar Jul 28 '16 15:07 sangwon04

I went back and added it and it still returned the error.

PraeceptorXS avatar Jul 28 '16 15:07 PraeceptorXS

What happens with

python pokecli.py -cf configs/config.json -a "google"

Vvkmnn avatar Jul 28 '16 15:07 Vvkmnn

@PraeceptorXS I'd make sure your config.json is properly saved then start a new shell and try running the script. Running the script explicitly with the '-a' param should also be interesting to see how it returns.

sangwon04 avatar Jul 28 '16 15:07 sangwon04

(PokemonGo-Bot) Bens-MBP-2:PokemonGo-Bot BenSun$ python pokecli.py -cf configs/config.json -a "google" usage: pokecli.py [-h] [-cf CONFIG] pokecli.py: error: unrecognized arguments: -a google

PraeceptorXS avatar Jul 28 '16 15:07 PraeceptorXS

Ok.

PraeceptorXS avatar Jul 28 '16 15:07 PraeceptorXS

No, leave out the 'cf configs/config.json' if you're going to explicitly authenticate from the shell.

sangwon04 avatar Jul 28 '16 15:07 sangwon04

You're also pulling from the dev branch, which includes the latest version but can be unstable (IIRC). Have you tried pulling from the master branch to see if you saw this same issue?

sangwon04 avatar Jul 28 '16 15:07 sangwon04

Yeah. I've used both branches and it always returns the same error.

PraeceptorXS avatar Jul 28 '16 15:07 PraeceptorXS

Authenticating is very straightforward. Try running 'python pokecli.py -a google -u -p'

sangwon04 avatar Jul 28 '16 15:07 sangwon04

It says unrecognized argument. I put my username and password after the -u and -p

PraeceptorXS avatar Jul 28 '16 15:07 PraeceptorXS

I have the same issues when using docker

kscheung1228 avatar Jul 28 '16 15:07 kscheung1228

Same here

RaziHaj avatar Jul 28 '16 16:07 RaziHaj

Well, I tried running the bot on a different computer. Now I'm getting this error. PokemonGo-Bot) Graces-iMac-216:PokemonGo-Bot GraceXu$ python pokecli.py [11:19:51] PokemonGO Bot v1.0 [11:19:51] No config argument specified, checking for /configs/config.json Traceback (most recent call last): File "pokecli.py", line 294, in main() File "pokecli.py", line 244, in main config = init_config() File "pokecli.py", line 64, in init_config load.update(json.load(data)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 291, in load **kw) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

PraeceptorXS avatar Jul 28 '16 16:07 PraeceptorXS

Ok I think I figured it out. First, make sure the config.json in your PokemonGo-Bot is named correctly and formatted correctly. Autocorrect messed up some quotes and that was what was messing stuff up. Also, make sure that the config.json is a valid json.

PraeceptorXS avatar Jul 28 '16 16:07 PraeceptorXS

Glad to caught it. Seems like the issue was very trivial.

sangwon04 avatar Jul 28 '16 17:07 sangwon04