asn1tools
                                
                                
                                
                                    asn1tools copied to clipboard
                            
                            
                            
                        ASN1Tools Fails to Compile 3GPP Release 16 ASN.1
When trying to compile 3GPP's ASN.1 for S1AP Release 16 using asn1tools version 0.164.0, the compilation fails with the following error:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/compiler.py", line 376, in compile_files
    return compile_dict(parse_files(filenames, encoding),
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/compiler.py", line 308, in compile_dict
    return Specification(codec.compile_dict(specification,
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/ber.py", line 1773, in compile_dict
    return Compiler(specification, numeric_enums).process()
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/compiler.py", line 210, in process
    self.pre_process()
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/compiler.py", line 257, in pre_process
    self.pre_process_parameterization_step_1(module['types'],
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/compiler.py", line 529, in pre_process_parameterization_step_1
    self.pre_process_parameterization_step_1_type(type_descriptor,
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/compiler.py", line 548, in pre_process_parameterization_step_1_type
    self.pre_process_parameterization_step_1_type(member,
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/compiler.py", line 590, in pre_process_parameterization_step_1_type
    self.pre_process_parameterization_step_1_dummy_to_actual_type(
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/compiler.py", line 629, in pre_process_parameterization_step_1_dummy_to_actual_type
    self.pre_process_parameterization_step_1_dummy_to_actual_type(
  File "/asn1_venv/lib/python3.10/site-packages/asn1tools/codecs/compiler.py", line 643, in pre_process_parameterization_step_1_dummy_to_actual_type
    if parameter['type'] == dummy_parameter:
TypeError: string indices must be integers
This occurs either when the various S1AP ASN.1 definitions are in separate files or concatenated into a single file. The S1AP-IEs or S1AP-Containers definitions appears to be the offending definitions as compilation completes okay without including them, although this leaves the compiled ASN1 missing the actual definitions needed to encode/decode S1AP messages.
On further testing this appears to apply with R15 and R14 S1AP as well.
Is any update? I have same issue when I use asn1tools to compile 3GPP TS38.413 release v17.4.0 for NGAP decoding. ans1tools version is 0.166.0
Traceback (most recent call last):
File "/mnt/e/Work/programming/python/testASN1/test.py", line 20, in 
I think the README.md clearly states which language features are supported and not.
Most 3GPP (particularly NAS, but also S1AP) specifications make use of information object classes / the CLASS keyword.
The README.md says The CLASS keyword (X.681) and its friends are not yet supported.