marvin-zhao/pyang

pyang script 2.6 is giving some errors.

GoogleCodeExporter opened this issue · 3 comments

What steps will reproduce the problem?
1.I simply ran command pyang /$YANG_DIR/mod.yang
2.By doing this I am getting the below error:

daffodil:/var/Netconf/pyang-1.4.1.tar/dist/pyang-1.4.1/build/scripts-2.6 # 
pyang /var/Netconf/Modules/I36.yang
Traceback (most recent call last):
  File "/usr/local/bin/pyang", line 333, in <module>
    run()
  File "/usr/local/bin/pyang", line 245, in run
    expect_failure_error=False)
  File "/usr/local/lib64/python2.6/site-packages/pyang/__init__.py", line 99, in add_module
    return self.add_parsed_module(module)
  File "/usr/local/lib64/python2.6/site-packages/pyang/__init__.py", line 128, in add_parsed_module
    statements.validate_module(self, module)
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 95, in validate_module
    iterate(module, phase)
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 52, in iterate
    res = f(ctx, stmt)
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 185, in <lambda>
    ('expand_1', 'module'):lambda ctx, s: v_expand_1_children(ctx, s),
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 1193, in v_expand_1_children
    v_expand_1_children(ctx, s)
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 1191, in v_expand_1_children
    v_expand_1_children(ctx, s)
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 1182, in v_expand_1_children
    v_expand_1_uses(ctx, s)
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 1252, in v_expand_1_uses
    v_expand_1_children(ctx, stmt.i_groupings)
  File "/usr/local/lib64/python2.6/site-packages/pyang/statements.py", line 1120, in v_expand_1_children
    if stmt.keyword == 'grouping' and hasattr(stmt, "i_expanded"):
AttributeError: 'dict' object has no attribute 'keyword'


What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?

I am using pyang 2.6
Please provide any additional information below.

Original issue reported on code.google.com by akula.de...@gmail.com on 24 Dec 2013 at 5:00

Please let me know if this is an error due to the yang module or there is some 
error in the script

Original comment by akula.de...@gmail.com on 24 Dec 2013 at 5:11

Original comment by mbj4...@gmail.com on 14 Nov 2014 at 1:59

Sorry for not replying to this, it was completely missed.

I think this is an error due to the YANG module, so if you still has it, please 
attach it.

Original comment by mbj4...@gmail.com on 14 Nov 2014 at 1:59