You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yasn1.error.PyAsn1Error: <TagSet object, tags 64:0:9> not in asn1Spec: None
This is my code:
from pyasn1.codec.ber import decoder, encoder
from pyasn1.type import univ
if __name__ == "__main__":
with open("ETSI/ITS-Container.asn", "r") as module1_file:
module1 = module1_file.read()
with open("ETSI/ISO-TS-19091-addgrp-C-2018.asn", "r") as module2_file:
module2 = module2_file.read()
with open("ETSI/SPATEM-PDU-Descriptions.asn", "r") as module3_file:
module3 = module3_file.read()
# Decode the contents of the files into ASN.1 objects
module1_obj, _ = decoder.decode(module1.encode())
module2_obj, _ = decoder.decode(module2.encode())
module3_obj, _ = decoder.decode(module3.encode())
# Concatenate the contents of the objects into a single sequence
merged_module_obj = univ.Sequence(module1_obj + module2_obj + module3_obj)
# Encode the merged object back into a BER-encoded string
merged_module = bytes(encoder.encode(merged_module_obj))
# Write the merged module to a file
with open("merged_module.asn", "wb") as merged_module_file:
merged_module_file.write(merged_module)
Help is much appreciated.
The text was updated successfully, but these errors were encountered:
I am trying to merge these files:
https://forge.etsi.org/rep/ITS/asn1/cdd_ts102894_2/-/blob/release2/ETSI-ITS-CDD.asn
https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn
https://forge.etsi.org/rep/ITS/asn1/is_ts103301/-/blob/v1.3.1/SPATEM-PDU-Descriptions.asn
But getting the error:
This is my code:
Help is much appreciated.
The text was updated successfully, but these errors were encountered: