Hello,
We are seeing below errors when trying to generate .java classes from yang files using jnc
pyang -f jnc --jnc-output src/genTraceback (most recent call last):File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 800, in _searchiterate(stmt.i_children, acc)AttributeError: i_children
During handling of the above exception, another exception occurred:
Traceback (most recent call last):File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 552, in pairwiseitem = next(iterator) # throws StopIteration if empty.StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):File "/usr/local/bin/pyang", line 493, inrun()File "/usr/local/bin/pyang", line 462, in runemit_obj.emit(ctx, modules, fd)File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 208, in emitself.generate_from(module)File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 247, in generate_fromgenerator.generate()File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 998, in generateself.generate_classes()File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 1097, in generate_classeschild_generator.generate()File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 1000, in generateself.generate_class()File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 1202, in generate_classfield = self.generate_child(ch)File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 1286, in generate_childchild_gen = MethodGenerator(sub, self.ctx)File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 1884, in initsearch(stmt, yangelement_stmts | leaf_stmts)]File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 804, in searchsearch(stmt, keywords, dict)File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 802, in _searchiterate(stmt.substmts, acc)File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 779, in iteratekey = ' '.join([ch.keyword, camelize(ch.arg)])File "/usr/local/lib/python3.8/dist-packages/pyang/plugins/jnc.py", line 589, in camelizefor character, next_character in iterator:RuntimeError: generator raised StopIteration
Please help identify the exact error here. The error is seen for only a handful of yang files. For remaining yang files, the java classes are generated without any errors/warnings.
Thanks,Shrikant
View more