dhrone / Raspdac-Display

An alternate display program for the Raspdac from Audiophonics which uses a Winstar OLED 16x2 display
MIT License
11 stars 9 forks source link

SPOD does not work #21

Closed fferroni closed 6 years ago

fferroni commented 7 years ago

Hello,

Another issue. I tried activating the "True" flag for ENABLE_SPOD in the RaspDac_Display.py file, but the service fails and enters a failed state. This is what it logs:

Traceback (most recent call last):
  File "RaspDacDisplay.py", line 904, in <module>
    prev_state = rd.status()
  File "RaspDacDisplay.py", line 629, in status
    status = self.status_spop()
  File "RaspDacDisplay.py", line 463, in status_spop
    spot_status = json.loads(spot_status_string)
  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 object: line 1 column 1 (char 0)

Thanks again! Francesco

anthonymonti2 commented 6 years ago

I solved your problem. I had the same issue and found a solution. What you have to do is replace this line from this self.spotclient.read_until("\n").strip() to self.spotclient.read_until("}").strip() and it should work. This line occurs around the 450 line mark. Hope this helps

dhrone commented 6 years ago

I'm no longer actively developing this code-base having moved my effort over to pydPiper. I will comment the change that anthonymonti2 has suggested but will be unable to test the result.