trunk-player icon indicating copy to clipboard operation
trunk-player copied to clipboard

json.decoder.JSONDecodeError: Extra data: line 1 column 14 (char 13)

Open mattmac553 opened this issue 5 years ago • 7 comments

Hello, I am trying to have trunk-recorder upload analog calls. In trunk recorder I get this message every call, I have not been able to receive a single call yet. What do I need to do?

Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File "/Users/matthewcarango/trunk-player/env/lib/python3.8/site-packages/django/core/management/init.py", line 364, in execute_from_command_line utility.execute() File "/Users/matthewcarango/trunk-player/env/lib/python3.8/site-packages/django/core/management/init.py", line 356, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/matthewcarango/trunk-player/env/lib/python3.8/site-packages/django/core/management/base.py", line 283, in run_from_argv self.execute(*args, **cmd_options) File "/Users/matthewcarango/trunk-player/env/lib/python3.8/site-packages/django/core/management/base.py", line 330, in execute output = self.handle(*args, **options) File "/Users/matthewcarango/trunk-player/radio/management/commands/add_transmission.py", line 60, in handle add_new_trans(options) File "/Users/matthewcarango/trunk-player/radio/management/commands/add_transmission.py", line 135, in add_new_trans data = json.load(data_file) 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 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 1 column 14 (char 13)

mattmac553 avatar Jun 27 '20 21:06 mattmac553

I am using a Mac

mattmac553 avatar Jun 27 '20 22:06 mattmac553

It does not like the json file from trunkrecorder, can you post one of the json files that is being created.

dreinhold avatar Jun 27 '20 23:06 dreinhold

"play_length": 0.840625, "source": 0, "freqList": [ { "freq": 508237500.000000, "time": 1593295233, "pos": 0.000000, "len": 0.000000, "error_count": 0.000000, "spike_count": 0.000000}] } @dreinhold

mattmac553 avatar Jun 27 '20 23:06 mattmac553

There should be more in that file. Does your encode upload have these lines in it? https://github.com/ScanOC/trunk-player/blob/master/utility/trunk-recoder/encode-upload.sh#L21-L24

dreinhold avatar Jun 27 '20 23:06 dreinhold

Thats all it says since I have installed Trunk-Player. Before it would say but not always all of that source if not every transmission would have it:

{ "freq": 5.06588e+08, "start_time": 1593134156, "stop_time": 1593134221, "emergency": 0, "talkgroup": 2, "srcList": [ {"src": 38020, "time": 1593132746, "pos": 0.247750, "emergency": 0, "signal_system": "MDC1200", "tag": ""}, {"src": 38017, "time": 1593133498, "pos": 0.267375, "emergency": 0, "signal_system": "MDC1200", "tag": ""}, {"src": 38006, "time": 1593134099, "pos": 0.258500, "emergency": 0, "signal_system": "MDC1200", "tag": ""}, {"src": 30608, "time": 1593134208, "pos": 0.274875, "emergency": 0, "signal_system": "MDC1200", "tag": ""} ], "freqList": [ ] }

@dreinhold

mattmac553 avatar Jun 28 '20 00:06 mattmac553

Correction right now the program seems to be deleting the files right after they pop up. @dreinhold

mattmac553 avatar Jun 28 '20 00:06 mattmac553

@mattmac553 Is this issue still persisting?

MaxwellDPS avatar Oct 08 '21 23:10 MaxwellDPS