andrew0 / SiriusXM

SiriusXM live radio playback

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSONDecodeError: Expecting ',' delimiter

zivilars777 opened this issue · comments

EDIT: Finally understood that it was a missing "," not in the sxm.py, but in my config.json – I fixed that, and now the recording script seems to work!! Just started it, but hopefully I managed to get it working now. If yes, I'll close this issue as soon as I found out.

EDIT 2: I've figured everything out now – it works! Thanks so much for this fantastic script and the work which went into it, highly appreciated! Closing this issue now. (Feel free to delete the whole thing, if you wish – I can't do this as the poster, if I see it correctly.)


I'm unfortunately not very familiar with coding and Python, but I am trying my best to get the SiriusXM script for the ripping server running to record my favourite Underground Garage shows. I managed to set up the simple streaming server for playing the channel in VLC/Quicktime – however, starting the server in ripping mode gives me headaches. At the moment, I get this message when trying to start it:

Traceback (most recent call last):
File "/Users/lars/SiriusXM-master/sxm.py", line 868, in
main()
File "/Users/lars/SiriusXM-master/sxm.py", line 841, in main
ripper = SiriusXMRipper(sirius_handler, args)
File "/Users/lars/SiriusXM-master/sxm.py", line 552, in init
self.config = json.load(open("/Users/lars/SiriusXM-master/config.json", "r"))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/init.py", line 293, in load
return loads(fp.read(),
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 19 column 2 (char 570)

Could the problem be that the config.json isn't found? I put the file in the same folder as the sxm.py, but it wasn't found ("[Errno 2] No such file or directory: 'config.json") – so I added the correct full path to the config.json into the script at the three lines where it is directly consulted. Does the JSONDecodeError tell me that the file still isn't found? And do the lines above that tell me that I also still have other problems running the script?

Sorry for the confusion, but I'm totally lost with this – I would be so grateful if anybody could help me out what to exactly change in the script. This is how I saved it at the moment:

https://www.dropbox.com/s/mqx339wjcsfl0hf/sxm.py?dl=0

Thanks so much in advance!!! (and sorry for bad technical English – no native speaker ...)