{"action":"closed","issue":{"url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/47","labels_url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/47/comments","events_url":"https://api.github.com/repos/fboender/ansible-cmdb/issues/47/events","html_url":"https://github.com/fboender/ansible-cmdb/issues/47","id":122903918,"number":47,"title":"UnicodeDecodeError while unicode character in hosts comment","user":{"login":"zlowly","id":10518734,"avatar_url":"https://avatars.githubusercontent.com/u/10518734?v=3","gravatar_id":"","url":"https://api.github.com/users/zlowly","html_url":"https://github.com/zlowly","followers_url":"https://api.github.com/users/zlowly/followers","following_url":"https://api.github.com/users/zlowly/following{/other_user}","gists_url":"https://api.github.com/users/zlowly/gists{/gist_id}","starred_url":"https://api.github.com/users/zlowly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zlowly/subscriptions","organizations_url":"https://api.github.com/users/zlowly/orgs","repos_url":"https://api.github.com/users/zlowly/repos","events_url":"https://api.github.com/users/zlowly/events{/privacy}","received_events_url":"https://api.github.com/users/zlowly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fboender/ansible-cmdb/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-18T08:26:39Z","updated_at":"2015-12-21T08:47:21Z","closed_at":"2015-12-21T08:47:21Z","body":"Exception thrown after put some chinese characters as host comment in my hosts file :\r\n```\r\nansible-cmdb -i /home/ansible/hosts -d out/ > index.html\r\ndata_dir = /usr/lib/ansible-cmdb/ansiblecmdb/data\r\ntpl_dir = /usr/lib/ansible-cmdb/ansiblecmdb/data/tpl\r\nstatic_dir = /usr/lib/ansible-cmdb/ansiblecmdb/data/static\r\nParams\r\n------------------------------------------------------------\r\n{'columns': None,\r\n 'data_dir': '/usr/lib/ansible-cmdb/ansiblecmdb/data',\r\n 'lib_dir': '/usr/lib/ansible-cmdb/ansiblecmdb/data',\r\n 'local_js': '1',\r\n 'version': '1.9'}\r\nHosts\r\n------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/ansible-cmdb\", line 91, in <module>\r\n    sys.stdout.write(mytemplate.render(hosts=ansible.hosts, **params).encode('utf-8'))\r\n  File \"/usr/lib/ansible-cmdb/mako/template.py\", line 443, in render\r\n    return runtime._render(self, self.callable_, args, data)\r\n  File \"/usr/lib/ansible-cmdb/mako/runtime.py\", line 803, in _render\r\n    **_kwargs_for_callable(callable_, data))\r\n  File \"/usr/lib/ansible-cmdb/mako/runtime.py\", line 835, in _render_context\r\n    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)\r\n  File \"/usr/lib/ansible-cmdb/mako/runtime.py\", line 860, in _exec_template\r\n    callable_(context, *args, **kwargs)\r\n  File \"_usr_lib_ansible_cmdb_ansiblecmdb_data_tpl_html_fancy_tpl\", line 212, in render_body\r\n  File \"_usr_lib_ansible_cmdb_ansiblecmdb_data_tpl_html_fancy_tpl\", line 50, in col_comment\r\n  File \"_usr_lib_ansible_cmdb_ansiblecmdb_data_tpl_html_fancy_tpl\", line 650, in render_col_comment\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)\r\n```"}}