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
When I try to generate JSON file from Tapi yang file, pyang -swagger tool reports the following errors:
pyang -f swagger -o D:/YANG0329/tapi-topology.json D:/YANG0329/TapiTopology.yang
D:/YANG0329/TapiTopology.yang:4: error: module "Tapi" not found in search path
D:/YANG0329/TapiTopology.yang:593 (at D:/YANG0329/TapiTopology.yang:32): error: the key "localId" does not reference an existing leaf
D:/YANG0329/TapiTopology.yang:593 (at D:/YANG0329/TapiTopology.yang:104): error: th e key "uuid" does not reference an existing leaf
D:/YANG0329/TapiTopology.yang:593 (at D:/YANG0329/TapiTopology.yang:160): error: th e key "uuid" does not reference an existing leaf
D:/YANG0329/TapiTopology.yang:593 (at D:/YANG0329/TapiTopology.yang:166): error: th e key "uuid" does not reference an existing leaf
D:/YANG0329/TapiTopology.yang:593 (at D:/YANG0329/TapiTopology.yang:226): error: th e key "localId" does not reference an existing leaf
Traceback (most recent call last):
File "/usr/bin/pyang", line 4, in import('pkg_resources').run_script('pyang==1.7', 'pyang')
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 729, in r un_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources/init.py", line 1642, in run_script
exec(code, namespace, namespace)
File "/usr/lib/python2.7/site-packages/pyang-1.7-py2.7.egg/EGG-INFO/scripts/pyang ", line 434, in
run()
File "/usr/lib/python2.7/site-packages/pyang-1.7-py2.7.egg/EGG-INFO/scripts/pyang ", line 408, in run
emit_obj.emit(ctx, modules, fd)
File "/usr/lib/python2.7/site-packages/pyang-1.7-py2.7.egg/pyang/plugins/swagger. py", line 98, in emit
emit_swagger_spec(ctx, modules, fd, ctx.opts.path)
File "/usr/lib/python2.7/site-packages/pyang-1.7-py2.7.egg/pyang/plugins/swagger. py", line 142, in emit_swagger_spec
referenced_types = findTypedefs(ctx, module, models, referenced_types)
File "/usr/lib/python2.7/site-packages/pyang-1.7-py2.7.egg/pyang/plugins/swagger. py", line 292, in findTypedefs
findTypedefs(ctx, module, child.i_children, referenced_types)
File "/usr/lib/python2.7/site-packages/pyang-1.7-py2.7.egg/pyang/plugins/swagger. py", line 292, in findTypedefs
findTypedefs(ctx, module, child.i_children, referenced_types)
File "/usr/lib/python2.7/site-packages/pyang-1.7-py2.7.egg/pyang/plugins/swagger. py", line 282, in findTypedefs
models = [type for type in subm.i_typedefs.values() if str(type.arg) == str(att ribute.arg.split(':')[-1]) and type.arg not in [element.arg for element in referenc ed_types]]
AttributeError: 'NoneType' object has no attribute 'i_typedefs'
Please help find the reason, thanks. And the weird thing is the tool says the following error:
D:/YANG0329/TapiTopology.yang:4: error: module "Tapi" not found in search path
While Tapi indeedly exists in the path as shown in the left figure. Tapi.yang is transformed successfully but the other yang files are all failed.
The text was updated successfully, but these errors were encountered:
When I try to generate JSON file from Tapi yang file, pyang -swagger tool reports the following errors:
Please help find the reason, thanks. And the weird thing is the tool says the following error:
While Tapi indeedly exists in the path as shown in the left figure. Tapi.yang is transformed successfully but the other yang files are all failed.
The text was updated successfully, but these errors were encountered: