P1sec / pycrate

A Python library to ease the development of encoders and decoders for various protocols and file formats; contains ASN.1 and CSN.1 compilers.
GNU Lesser General Public License v2.1
382 stars 132 forks source link

JER decoding of CAM - ITS messages failing #101

Closed keyankay closed 4 years ago

keyankay commented 4 years ago

When i try do a JER decoding of sample CAM message (sample_cam.uper attached the file here) i get the following error

File "sample_cam.py", line 22, in cam.to_jer() AttributeError: 'SEQ' object has no attribute 'to_jer'

Please let know if i am missing something here

sample_cam.zip

I have pasted the sample code here

with open ("sample_cam.uper") as binary_file: cam_data = binary_file.read()

decoding from binary

cam.from_uper(cam_data) cam.to_aper() cam.to_ber() cam.to_cer() cam.to_der() cam.to_jer()

keyankay commented 4 years ago

Found out the issue, the issue was with the python version. Was using a older python version and it was failing. Works in python 3 and above