kimgr / asn1ate

A Python library for translating ASN.1 into other forms.
Other
69 stars 41 forks source link

Exception while parsing RFC 3851 ASN.1 definition #31

Closed rgov closed 8 years ago

rgov commented 8 years ago

Here's the definition extracted from the text of RFC 3851.

When I run pyasn1gen.py rfc3851.asn with either Python 2.7.10 or Python 3.5.0, I get:

  File "asn1ate/asn1ate/pyasn1gen.py", line 299, in inline_defined_type
    if t.module_name and t.module_name != self.sema_module.name:
AttributeError: 'DefinedType' object has no attribute 'module_name'

This is strange since DefinedType's constructor does set the module_name attribute, but with some print debugging it looks like this DefinedType instance was never initialized. Not sure how that could be.

rgov commented 8 years ago

Oh, there seems to be a mismatch between the version of asn1ate I installed with pip and the repo (from which I got pyasn1ate.py since that was not installed by pip).

rgov commented 8 years ago

(There's another exception, but it's not this one, so closing.)