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

No JSON

Open drees5 opened this issue 10 years ago • 7 comments

i keep on getting this error File "pokecli.py", line 220, in 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 "/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 i have installed requirements.txt many times, please help #

drees5 avatar Jul 31 '16 14:07 drees5

check your config file, maybe you have sintaxys problems

crusardri avatar Jul 31 '16 14:07 crusardri

Delete all and clone again after that on folder make pip install --upgrade -r requirements.txt

Also check your config file

ZgrK avatar Jul 31 '16 15:07 ZgrK

Had the same issue a couple hours ago. Did you upgrade to the newest dev version? They changed the discard item names from the item numbers to their respective names, that's what messed it up for me, might be the same for you?

LePhoebs avatar Jul 31 '16 15:07 LePhoebs

No JSON object could be decoded simply means that you've got a syntactical error in your JSON file - you're missing a double quote, you've got a comma in the wrong place, you're missing a comma that should be there, you've got the wrong number of curly braces, or you've got them in the wrong places, maybe it's square brackets that's messed up....

If JSON syntax isn't your thing and you're not sure where the problem lies, the Python error message isn't all that helpful in tracking the problem down. You might want to simply paste your config file into the left box at http://www.jsoneditoronline.org and hover over the little red X's along the side to see what's messed up and fix it.

broberson avatar Jul 31 '16 16:07 broberson

How do you fix a double quote, i put my config through jsonlint and apparently i needed a double quote in my username and password

drees5 avatar Aug 01 '16 06:08 drees5

@drees5 The example config shows you how to do it:

"username": "[email protected]",
"password": "YOURPASSWORD",

If your username or password actually contains a double-quote character, you'll need to escape it -- that is, put a backslash in front of it: "password\"1234".

Your most likely problem is that you're using some kind of word processor to edit this stuff, and it's inserting typographical quotes to make your text look pretty -- “these fancy quotes” won't work, you should use "these normal quotes" instead. If starting quotes and ending quotes don't look quite the same, or they're angled rather than vertical, they're not the right character, they're not valid JSON and that's your problem. Use notepad or something that just does text and avoid editing code in MS Word.

Beyond that, I'm not sure what your problem could be without seeing the actual JSON, and since pasting your password here would be pretty stupid, we're not gonna do that. :)

broberson avatar Aug 01 '16 07:08 broberson

I fixed the double quote, it was something wrong with the config, i had to retype all the brackets myself then it worked

drees5 avatar Aug 01 '16 07:08 drees5