qabro fails to launch and throws `json.decoder.JSONDecodeError` exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bugit |
Fix Released
|
High
|
Pierre Equoy |
Bug Description
Summary
=======
Happens with both QABro 0.12 and 0.13.
Tested on a device with an Intel Atom CPU and 2GB RAM.
Sometimes, qabro fails to launch and throws `json.decoder.
$ qabro
Traceback (most recent call last):
File "/snap/
sys.
File "/snap/
qabro_snap_info = [e for e in ss.get_snaps() if e['name'] == 'qabro'][0]
File "/snap/
json_resp = self.request(req)
File "/snap/
json_resp = self._get_
File "/snap/
return json.loads(
File "/snap/
return _default_
File "/snap/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/snap/
raise JSONDecodeError
json.decoder.
Sometimes, qabro can be launched without a problem.
Failure rate: 2/10
Initial investigation
=======
qabro.utils.
Related branches
- Maciej Kisielewski (community): Approve
- Devices Certification Bot: Pending requested
-
Diff: 418 lines (+222/-82)8 files modifiedCONTRIBUTING.md (+113/-0)
qabro/__init__.py (+4/-4)
qabro/bug_assistant.py (+15/-15)
qabro/utils.py (+7/-62)
setup.cfg (+6/-0)
setup.py (+4/-0)
snap/snapcraft.yaml (+4/-1)
tests/test_bug_assistant.py (+69/-0)
Changed in qabro: | |
importance: | Undecided → High |
status: | New → Fix Committed |
Changed in qabro: | |
status: | Fix Committed → Fix Released |
A better solution to communicate with snapd would be to use, as explained by jamesh on the snapcraft forum a long time ago[1].
It requires python3-gi and gir1.2-snapd-1 packages.
Then (see Snapd Gi doc for more info[2]):
import gi version( 'Snapd' , '1') lags(0) sync(Snapd. GetSnapsFlags( 0), None): snap.props. name, snap.props.devmode)
gi.require_
from gi.repository import Snapd
c = Snapd.Client()
active_snaps_flag = Snapd.GetSnapsF
for snap in c.get_snaps_
print(
[1] https:/ /forum. snapcraft. io/t/how- to-communicate- with-run- snapd-socket- using-python/ 6432/4 /lazka. github. io/pgi- docs/#Snapd- 1
[2] https:/