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 "", line 46, in top-level template code
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'iteritems'
I noticed on my server that the dist packages for python are all installed under python3.5, but when I attempt to install them under python 2.7, pip claims the requirement is already satisfied by the distribution under 3.5.
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 "", line 46, in top-level template code
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'iteritems'
I noticed on my server that the dist packages for python are all installed under python3.5, but when I attempt to install them under python 2.7, pip claims the requirement is already satisfied by the distribution under 3.5.