Actions
Bug #6073
closedError with update_binary_decoded
Start date:
06/23/2023
Due date:
% Done:
80%
Spec Reference:
Description
When I execute update_binary_decoded an error occurs:
pySIM-shell (MF/ADF.ISIM/EF.DOMAIN)> update_binary_decoded --json-path domain ims.mnc099.mcc999.3gppnetwork.org Traceback (most recent call last): File "/root/.local/lib/python3.10/site-packages/cmd2/cmd2.py", line 2399, in onecmd_plus_hooks stop = self.onecmd(statement, add_to_history=add_to_history) File "/root/.local/lib/python3.10/site-packages/cmd2/cmd2.py", line 2852, in onecmd stop = func(statement) File "/root/.local/lib/python3.10/site-packages/cmd2/decorators.py", line 382, in cmd_wrapper return func(*args_list, **kwargs) # type: ignore[call-arg] File "/home/zhuravlev-v/pysim/pySim/filesystem.py", line 636, in do_update_binary_decoded json.loads(opts.data)) File "/usr/lib/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) EXCEPTION of type 'JSONDecodeError' occurred with message: Expecting value: line 1 column 1 (char 0)
Related issues
Updated by laforge about 1 year ago
- Related to Bug #6072: Error with edit_binary_decoded added
Updated by laforge about 1 year ago
turns out this is actually a known problem, but one where we have no idea why it is caused:
# TS 31.103 Section 4.2.3 class EF_DOMAIN(TransparentEF): # FIXME: re-encode fails with "string encoding failed, expected unicode string" _test_decode = [ ( '8021696d732e6d6e633030302e6d63633733382e336770706e6574776f726b2e6f7267', { "domain": "ims.mnc000.mcc738.3gppnetwork.org" } ), ] class domain(BER_TLV_IE, tag=0x80): _construct = GreedyString("utf8") def __init__(self, fid='6f03', sfid=0x05, name='EF.DOMAIN', desc='Home Network Domain Name', **kwargs): super().__init__(fid=fid, sfid=sfid, name=name, desc=desc, **kwargs) self._tlv = EF_DOMAIN.domain
Updated by laforge about 1 year ago
- Status changed from New to In Progress
- Assignee set to laforge
Updated by laforge about 1 year ago
- % Done changed from 0 to 80
Proposed fix is in https://gerrit.osmocom.org/c/pysim/+/33451 and the change https://gerrit.osmocom.org/c/pysim/+/33452 enables the unit test verifying that the encoder of EF.DOMAIN actually works now.
Actions