0

I have done configuring some of the commands in making the DHT22 Temperature Sensor work.

I have done configuring some codes in config.json now I am up to this python DHT22logger.py but I am getting this error (refer below)

Traceback (most recent call last):
  File "DHT22logger.py", line 422, in <module>
    main()
  File "DHT22logger.py", line 251, in main
    configurations = getConfigurations()
  File "DHT22logger.py", line 243, in getConfigurations
    configurations = json.loads(open(configurationFile).read())
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, 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
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 21 column 2 (char 347)

There is a tutorial that I have been following, when he write this python DHT22logger.py no errors, and the datas are in there. But in my case none.

1

There is an error in your configuration file.

Python, rather helpfully, tells you where.

line 21 column 2 (char 347)

  • I've been in sudo vim DHT22logger.py in line 21 "there is nothing" just blank. – pjforum Feb 16 '17 at 16:43
  • @pjforum That suggests that more data is expected, i.e. your JSON is malformed. – joan Feb 16 '17 at 16:55
  • there is a tutorial that I have followed and for him everything works perfect!! I don't know why, I just followed his steps thoroughly. – pjforum Feb 16 '17 at 16:58
  • @pjforum What does "I have done configuring some codes in config.json" mean? – joan Feb 16 '17 at 17:18
  • 1
    @pjforum I have not changed the configuration and it runs past the configuration code. You said you did not change the configuration so it should get to the same point. IF you HAVE changed the configuration you have made an incorrect change. – joan Feb 16 '17 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.