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
While generating bindings for a model in RFC 8040 Section 8 (https://tools.ietf.org/html/rfc8040#section-8), pyangbind is reporting an exception that seem to be a bug. The model (simplified by removing non-relevant parts) is listed below. The same exception is raised when you use anyxml instead of anydata.
And pyangbind raises the next exception. Pyangbind raises the same exception when your model contains anyxml instead of anydata:
Traceback (most recent call last):
File "/usr/local/bin/pyang", line 444, in <module>
run()
File "/usr/local/bin/pyang", line 413, in run
emit_obj.emit(ctx, modules, fd)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 224, in emit
build_pybind(ctx, modules, fd)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 426, in build_pybind
get_children(ctx, fd, children, m, m)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 742, in get_children
parent_cfg=parent_cfg, choice=choice, register_paths=register_paths)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 1408, in get_element
choice=choice, register_paths=register_paths)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 742, in get_children
parent_cfg=parent_cfg, choice=choice, register_paths=register_paths)
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 1460, in get_element
element.search_one('type')))
File "/usr/local/lib/python2.7/dist-packages/pyangbind/plugin/pybind.py", line 1150, in build_elemtype
pattern_stmt = et.search_one('pattern') if not et.search_one('pattern') \
AttributeError: 'NoneType' object has no attribute 'search_one'
Could you check it, please?
TIA,
Lluís
The text was updated successfully, but these errors were encountered:
JoseIgnacioTamayo
changed the title
AttributeError with anydata and anyxml statements
Add suport for anydata and anyxml statements
Feb 23, 2024
Hi Rob,
While generating bindings for a model in RFC 8040 Section 8 (https://tools.ietf.org/html/rfc8040#section-8), pyangbind is reporting an exception that seem to be a bug. The model (simplified by removing non-relevant parts) is listed below. The same exception is raised when you use anyxml instead of anydata.
I'm generating the bindings using:
And pyangbind raises the next exception. Pyangbind raises the same exception when your model contains
anyxml
instead ofanydata
:Could you check it, please?
TIA,
Lluís
The text was updated successfully, but these errors were encountered: