Juniper / open-nti

Open Network Telemetry Collector build with open source tools
Apache License 2.0
233 stars 93 forks source link

genadashboard and python issues #244

Open klrobertson opened 6 years ago

klrobertson commented 6 years ago

I updated my Open-NTI installation yesterday to the latest version and when I try to create a new dashboard, I am getting an error:

root@wf-opennti1:/home/juniper/open-nti/dashboards# python gendashboard.py --file test-dashboard-desktop.yaml Traceback (most recent call last): File "gendashboard.py", line 6, in import yaml File "/usr/local/lib/python3.5/dist-packages/yaml/init.py", line 284 class YAMLObject(metaclass=YAMLObjectMetaclass): ^ SyntaxError: invalid syntax root@wf-opennti1:/home/juniper/open-nti/dashboards#

It seems like this is trying to use python 3.5 with python 2.7 as the interpreter? Can you help? I tried using python3.5 to make the same call, but there are embedded calls within the distribution that seem to be tied to python 2.x:

root@wf-opennti1:/home/juniper/open-nti/dashboards# python3.5 gendashboard.py --file test-dashboard-desktop.yaml opennti - INFO - Opening Configuration file test-dashboard-desktop.yaml opennti - INFO - Add Row : test-rows-re-health.yaml opennti - INFO - - Add Graph :test-graph-system-storage-junos.yaml Traceback (most recent call last): File "gendashboard.py", line 86, in graph_tpl_rdr = Template(graph_tpl.read()).render(graph_conf) File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "/usr/local/lib/python3.5/dist-packages/jinja2/environment.py", line 780, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/jinja2/_compat.py", line 37, in reraise raise value.with_traceback(tb) File "