scaidermern/piCamBot

ValueError: No JSON object could be decoded

Densgithub opened this issue · 3 comments

Hey guys, Im sorry.. i have error with my raspberrypi..

Traceback (most recent call last):
File "piCamBot.py", line 480, in
bot.run()
File "piCamBot.py", line 61, in run
self.config = json.load(open('config.json', 'r'))
File "/usr/lib/python2.7/json/init.py", line 291, in load
**kw)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/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

There is an error in your config.json. Unfortunately the message doesn't tell us the exact location of the error. Did you replace YOUR_TELEGRAM_USER_ID with your telegram user id?

Try to paste your config.json in one of the online JSON validators, e.g. https://jsonformatter.curiousconcept.com/ or https://jsonlint.com/ (and ignore warnings about duplicated keys...).

Solved with change from [ YOUR_TELEGRAM_USER_ID ] to "YOUR_TELEGRAM_USER_ID"

thanks

Fine :) You should still configure your actual user id, though.