Hi I am using Yang Explorer on a Mac running 10.11.6 (El Capitan). I am starting Yang Explorer in a virtual environment and have attempted to sync Yang Models from the Devnet CSR (ios-xe-mgmt.cisco.com). Browser being used is Chrome 52.0.2743.116. I have tried using both Python 2.7.8 and Python 3.5, and still receive an error when attempting to sync Yang Models from the 'Manage Models/Device' pane.
Looking at the Bash shell I have running it seems that there is a parsing failure of the downloaded model. Output below:-
INFO:explorer.utils.schema:Downloading ['ietf-ip@2014-01-08']
INFO:explorer.utils.schema:Downloading set(['ietf-inet-types', 'ietf-yang-types', 'ietf-interfaces'])
ERROR:root:Could not parse modulename, uploaded file may be corrupted !!
ERROR:root:Could not parse modulename, uploaded file may be corrupted !!
INFO:explorer.utils.schema:Downloading set(['ietf-yang-types'])
ERROR:root:Could not parse modulename, uploaded file may be corrupted !!
[20/Sep/2016 09:45:21] ERROR [django.request] Internal Server Error: /explorer/schema
Traceback (most recent call last):
File "/Users/sihart/yang-explorer/v/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, _callback_args, _callback_kwargs)
File "/Users/sihart/yang-explorer/server/explorer/views.py", line 302, in schema_handler
return add_schema(request, req)
File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 213, in add_schema
modules = download_yang(request, req)
File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 167, in download_yang
new_fname = os.path.join(session_dir, parser.get_filename())
File "/Users/sihart/yang-explorer/server/explorer/utils/yang.py", line 78, in get_filename
return self.module + '.yang'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
ERROR:django.request:Internal Server Error: /explorer/schema
Traceback (most recent call last):
File "/Users/sihart/yang-explorer/v/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, _callback_args, _callback_kwargs)
File "/Users/sihart/yang-explorer/server/explorer/views.py", line 302, in schema_handler
return add_schema(request, req)
File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 213, in add_schema
modules = download_yang(request, req)
File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 167, in download_yang
new_fname = os.path.join(session_dir, parser.get_filename())
File "/Users/sihart/yang-explorer/server/explorer/utils/yang.py", line 78, in get_filename
return self.module + '.yang'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
[20/Sep/2016 09:45:21]"GET /explorer/schema?&payload=%3Cpayload%20version%3D%223%22%20protocol%3D%22netconf%22%3E%0A%20%20%3Cmetadata%3E%0A%20%20%20%20%3Cdevice%2Dauth%20profile%3D%22%22%20platform%3D%22csr%22%20host%3D%22%22%20port%3D%22%22%20user%3D%22%22%20passwd%3D%22%22%2F%3E%0A%20%20%20%20%3Cnetconf%2Dauth%20host%3D%2264%2E103%2E37%2E51%22%20port%3D%2210000%22%20user%3D%22root%22%20passwd%3D%22C%21sc0123%22%2F%3E%0A%20%20%3C%2Fmetadata%3E%0A%20%20%3Ckeyvalue%2F%3E%0A%20%20%3Cschemas%3E%0A%20%20%20%20%3Cschema%3Eietf%2Dip%402014%2D01%2D08%3C%2Fschema%3E%0A%20%20%3C%2Fschemas%3E%0A%3C%2Fpayload%3E&action=add%2Dschema HTTP/1.1" 500 94216
Hi, Looks like downloaded yang files are either corrupted or invalid. Please retry sync and if this happens again see if yang-explorer/server/session/ has one or more yang files, if so, make sure they have .yang extension and you are able to manually open in an text editor and in fact they are valid yang modules. You can also zip and send me those files for debugging.
Hi I am using Yang Explorer on a Mac running 10.11.6 (El Capitan). I am starting Yang Explorer in a virtual environment and have attempted to sync Yang Models from the Devnet CSR (ios-xe-mgmt.cisco.com). Browser being used is Chrome 52.0.2743.116. I have tried using both Python 2.7.8 and Python 3.5, and still receive an error when attempting to sync Yang Models from the 'Manage Models/Device' pane.
Looking at the Bash shell I have running it seems that there is a parsing failure of the downloaded model. Output below:-
INFO:explorer.utils.schema:Downloading ['ietf-ip@2014-01-08'] INFO:explorer.utils.schema:Downloading set(['ietf-inet-types', 'ietf-yang-types', 'ietf-interfaces']) ERROR:root:Could not parse modulename, uploaded file may be corrupted !! ERROR:root:Could not parse modulename, uploaded file may be corrupted !! INFO:explorer.utils.schema:Downloading set(['ietf-yang-types']) ERROR:root:Could not parse modulename, uploaded file may be corrupted !! [20/Sep/2016 09:45:21] ERROR [django.request] Internal Server Error: /explorer/schema Traceback (most recent call last): File "/Users/sihart/yang-explorer/v/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, _callback_args, _callback_kwargs) File "/Users/sihart/yang-explorer/server/explorer/views.py", line 302, in schema_handler return add_schema(request, req) File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 213, in add_schema modules = download_yang(request, req) File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 167, in download_yang new_fname = os.path.join(session_dir, parser.get_filename()) File "/Users/sihart/yang-explorer/server/explorer/utils/yang.py", line 78, in get_filename return self.module + '.yang' TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' ERROR:django.request:Internal Server Error: /explorer/schema Traceback (most recent call last): File "/Users/sihart/yang-explorer/v/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, _callback_args, _callback_kwargs) File "/Users/sihart/yang-explorer/server/explorer/views.py", line 302, in schema_handler return add_schema(request, req) File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 213, in add_schema modules = download_yang(request, req) File "/Users/sihart/yang-explorer/server/explorer/utils/schema.py", line 167, in download_yang new_fname = os.path.join(session_dir, parser.get_filename()) File "/Users/sihart/yang-explorer/server/explorer/utils/yang.py", line 78, in get_filename return self.module + '.yang' TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' [20/Sep/2016 09:45:21]"GET /explorer/schema?&payload=%3Cpayload%20version%3D%223%22%20protocol%3D%22netconf%22%3E%0A%20%20%3Cmetadata%3E%0A%20%20%20%20%3Cdevice%2Dauth%20profile%3D%22%22%20platform%3D%22csr%22%20host%3D%22%22%20port%3D%22%22%20user%3D%22%22%20passwd%3D%22%22%2F%3E%0A%20%20%20%20%3Cnetconf%2Dauth%20host%3D%2264%2E103%2E37%2E51%22%20port%3D%2210000%22%20user%3D%22root%22%20passwd%3D%22C%21sc0123%22%2F%3E%0A%20%20%3C%2Fmetadata%3E%0A%20%20%3Ckeyvalue%2F%3E%0A%20%20%3Cschemas%3E%0A%20%20%20%20%3Cschema%3Eietf%2Dip%402014%2D01%2D08%3C%2Fschema%3E%0A%20%20%3C%2Fschemas%3E%0A%3C%2Fpayload%3E&action=add%2Dschema HTTP/1.1" 500 94216