tinder-detective icon indicating copy to clipboard operation
tinder-detective copied to clipboard

json.decoder.JSONDecodeError:

Open vipulasri opened this issue 8 years ago • 4 comments

Traceback (most recent call last): File "app.py", line 9, in stalker = api.NSASimulator() File "C:\Users\HP-HP\Desktop\tinder-detective\api.py", line 42, in init self.load_fb_auth() File "C:\Users\HP-HP\Desktop\tinder-detective\api.py", line 51, in load_fb_au th self.fb_auth = json.load(f) File "C:\Users\HP-HP\AppData\Local\Programs\Python\Python36\lib\json__init. py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "C:\Users\HP-HP\AppData\Local\Programs\Python\Python36\lib\json__init__. py", line 319, in loads return _default_decoder.decode(s) File "C:\Users\HP-HP\AppData\Local\Programs\Python\Python36\lib\json\decoder.p y", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\HP-HP\AppData\Local\Programs\Python\Python36\lib\json\decoder.p y", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

vipulasri avatar Jul 22 '16 12:07 vipulasri

Remove the first comment line in SECRETS.json // Make a file called SECRETS.json and fill it in like below

simasimsd avatar Jul 22 '16 12:07 simasimsd

now i am getting this error :

Traceback (most recent call last):
  File "C:\Users\HP-HP\AppData\Local\Programs\Python\Python36\lib\site-packages\
werkzeug\serving.py", line 65, in <module>
    from SocketServer import ThreadingMixIn, ForkingMixIn
ImportError: No module named 'SocketServer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 18, in <module>
    app.run(debug=True)
  File "C:\Users\HP-HP\AppData\Local\Programs\Python\Python36\lib\site-packages\
flask\app.py", line 828, in run
    from werkzeug.serving import run_simple
  File "C:\Users\HP-HP\AppData\Local\Programs\Python\Python36\lib\site-packages\
werkzeug\serving.py", line 68, in <module>
    from socketserver import ThreadingMixIn, ForkingMixIn
ImportError: cannot import name 'ForkingMixIn'

vipulasri avatar Jul 22 '16 12:07 vipulasri

I am getting the following error after removing the first comment line from the JSON file.

Traceback (most recent call last):
  File "app.py", line 9, in <module>
    stalker = api.NSASimulator()
  File "/Users/avinash/Downloads/tinder-detective-master/api.py", line 43, in __init__
    self._load_fb_auth()
  File "/Users/avinash/Downloads/tinder-detective-master/api.py", line 52, in _load_fb_auth
    self.fb_auth = json.load(f)
  File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 20 (char 21)

mohavinash avatar Jul 22 '16 16:07 mohavinash

The error usually means your JSON file has errors. Make sure it's in a standard JSON format.

adrianmcli avatar Jul 23 '16 05:07 adrianmcli