NightRang3r / Broadlink-e-control-db-dump

These two scripts will "parse" the broadlink e-Control Android application database or SharedData and dump the IR / RF codes for selected accessories into a text file which can be later used with broadlink-python to send the codes to the RM PRO hub
149 stars 52 forks source link

Can't extract or decode #28

Open PaeseSono opened 5 years ago

PaeseSono commented 5 years ago

I am getting this error while trying to get the code, it works before but not now anymore. Cant seems to understand whats the error code means, need some help here.

Here is the error Im getting

Traceback (most recent call last): File "getBroadlinkSharedData.py", line 65, in <module> jsonIrCodeData = json.loads(jsonIrCode) File "/home/ubuntu/.local/lib/python2.7/site-packages/simplejson/__init__.py", line 518, in loads return _default_decoder.decode(s) File "/home/ubuntu/.local/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/home/ubuntu/.local/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting ',' delimiter or ']': line 1 column 16235 (char 16234)

spaceSquid commented 5 years ago

same here... Traceback (most recent call last): File "getBroadlinkSharedData.py", line 65, in jsonIrCodeData = json.loads(jsonIrCode) File "/usr/lib/python2.7/site-packages/simplejson/init.py", line 518, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) File "/usr/lib/python2.7/site-packages/simplejson/scanner.py", line 79, in scan_once return _scan_once(string, idx) File "/usr/lib/python2.7/site-packages/simplejson/scanner.py", line 47, in _scan_once return parse_array((string, idx + 1), _scan_once) File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 250, in JSONArray value, end = scan_once(s, end) File "/usr/lib/python2.7/site-packages/simplejson/scanner.py", line 45, in _scan_once _scan_once, object_hook, object_pairs_hook, memo) File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 194, in JSONObject value, end = scan_once(s, end) File "/usr/lib/python2.7/site-packages/simplejson/scanner.py", line 47, in _scan_once return parse_array((string, idx + 1), _scan_once) File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 260, in JSONArray raise JSONDecodeError("Expecting ',' delimiter or ']'", s, end - 1) simplejson.errors.JSONDecodeError: Expecting ',' delimiter or ']': line 1 column 9991 (char 9990) /usr/local/dr # python Python 2.7.15 (default, Aug 16 2018, 14:17:09)

spaceSquid commented 5 years ago

This for me appeared to be an issue with the Json in jsonIrCode... on inspection the json wasn't complete. I went back to the app, shared the info again, grabbed the file and all's working.