-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3 incompatibility: inventory page table empty with puppetboard 0.2.1 #361
Comments
@buzzdeee The support of Puppetboard is still limited to Python < 3 as mentioned in the header of the README: At the current time of writing, Puppetboard supports the following Python versions:
|
I was wading through the README, but obviously missed that. |
@buzzdeee We are moving to python 3x support, so thanks for the feedback. |
Seeing the same after bumping to 0.2.2 just now. Looking forward to a 0.3.0 release including #355 :-) |
This should work now that 0.3.0 is released. |
I can confirm this appears to be fixed with the release of 0.3.0 and Python 3 (3.5 in our case). |
Can't we close this issue since it has been confirmed to have been fixed in 0.3.0? |
Hi,
accessing /inventory, I see the header of the inventory table, with all its columns, but the table contents is not rendered. Running the daemon in debug mode I see following backtrace:
[2017-02-13 13:21:24 +0100] [11148] [DEBUG] GET /inventory
[2017-02-13 13:21:24 +0100] [11148] [ERROR] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 181, in handle_request
for item in respiter:
File "/usr/local/lib/python3.6/site-packages/werkzeug/wsgi.py", line 703, in next
return self._next()
File "/usr/local/lib/python3.6/site-packages/werkzeug/wrappers.py", line 81, in _iter_encoded
for item in iterable:
File "/usr/local/lib/python3.6/site-packages/flask/helpers.py", line 129, in generator
for item in gen:
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 1208, in next
return self._next()
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 1190, in generator
c = next()
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 1013, in generate
yield self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python3.6/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/var/www/puppetboard/puppetboard/templates/inventory.html", line 1, in top-level template code
{% extends 'layout.html' %}
File "/var/www/puppetboard/puppetboard/templates/layout.html", line 95, in top-level template code
{% block content %} {% endblock content %}
File "/var/www/puppetboard/puppetboard/templates/inventory.html", line 15, in block "content"
{% for node, facts in fact_data.iteritems() %}
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'iteritems'
[2017-02-13 13:21:24 +0100] [11148] [DEBUG] Closing connection.
[2017-02-13 13:21:24 +0100] [76105] [DEBUG] GET /static/jquery-datatables-1.10.13/dataTables.semanticui.min.css
[2017-02-13 13:21:24 +0100] [11148] [DEBUG] GET /static/css/puppetboard.css
[2017-02-13 13:21:24 +0100] [11148] [DEBUG] GET /static/jquery-datatables-1.10.13/jquery.dataTables.min.js
[2017-02-13 13:21:24 +0100] [13229] [DEBUG] GET /static/jquery-datatables-1.10.13/dataTables.semanticui.min.js
[2017-02-13 13:21:24 +0100] [65581] [DEBUG] GET /static/js/d3.min.js
[2017-02-13 13:21:24 +0100] [11148] [DEBUG] GET /static/js/c3.min.js
[2017-02-13 13:21:24 +0100] [76105] [DEBUG] GET /static/Semantic-UI-2.1.8/semantic.min.css
[2017-02-13 13:21:24 +0100] [13229] [DEBUG] GET /static/moment.js-2.7.0/moment.min.js
[2017-02-13 13:21:24 +0100] [65581] [DEBUG] GET /static/js/timestamps.js
[2017-02-13 13:21:24 +0100] [65581] [DEBUG] GET /static/js/lists.js
[2017-02-13 13:21:24 +0100] [76105] [DEBUG] GET /static/jquery-2.1.1/jquery.min.js
[2017-02-13 13:21:24 +0100] [11148] [DEBUG] GET /static/js/scroll.top.js
[2017-02-13 13:21:24 +0100] [76105] [DEBUG] GET /static/Semantic-UI-2.1.8/semantic.min.js
[2017-02-13 13:21:24 +0100] [65581] [DEBUG] GET /static/jquery-tablesort-v.0.0.7/jquery.tablesort.min.js
[2017-02-13 13:21:32 +0100] [76105] [DEBUG] GET /static/js/lists.js
[2017-02-13 13:21:32 +0100] [11148] [DEBUG] GET /static/js/tables.js
I just have this in my default_settings.py with regard to INVENTORY_FACTS:
INVENTORY_FACTS = [('Hostname', 'fqdn'),
('IP Address', 'ipaddress'),
('OS', 'lsbdistdescription'),
('Architecture', 'hardwaremodel'),
('Kernel Version', 'kernelrelease'),
('PuppetXXX Version', 'puppetversion'), ]
Just added these XXX to see if it takes it and they are shown in the web interface.
Downgrading again to puppetboard 0.2.0 makes it work again.
I found this thread:
http://stackoverflow.com/questions/30418481/error-dict-object-has-no-attribute-iteritems-when-trying-to-use-networkx
so changed iteritems -> items and the table contents is rendered properly.
0.2.0 as well as the 0.2.1 run with python 3.6.0
The text was updated successfully, but these errors were encountered: