{"action":"opened","issue":{"url":"https://api.github.com/repos/nicolargo/glances/issues/840","repository_url":"https://api.github.com/repos/nicolargo/glances","labels_url":"https://api.github.com/repos/nicolargo/glances/issues/840/labels{/name}","comments_url":"https://api.github.com/repos/nicolargo/glances/issues/840/comments","events_url":"https://api.github.com/repos/nicolargo/glances/issues/840/events","html_url":"https://github.com/nicolargo/glances/issues/840","id":145616531,"number":840,"title":"Exception after running glances for several hours","user":{"login":"gregory094","id":5185941,"avatar_url":"https://avatars.githubusercontent.com/u/5185941?v=3","gravatar_id":"","url":"https://api.github.com/users/gregory094","html_url":"https://github.com/gregory094","followers_url":"https://api.github.com/users/gregory094/followers","following_url":"https://api.github.com/users/gregory094/following{/other_user}","gists_url":"https://api.github.com/users/gregory094/gists{/gist_id}","starred_url":"https://api.github.com/users/gregory094/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregory094/subscriptions","organizations_url":"https://api.github.com/users/gregory094/orgs","repos_url":"https://api.github.com/users/gregory094/repos","events_url":"https://api.github.com/users/gregory094/events{/privacy}","received_events_url":"https://api.github.com/users/gregory094/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-04T08:21:01Z","updated_at":"2016-04-04T08:21:01Z","closed_at":null,"body":"#### Circumstances\r\n\r\n* `glances` without options with the default config\r\n* running glances in tmux\r\n* after some hours of run the following error will occur:\r\n\r\n```\r\nTraceback (most recent call last):/python2.7/site-packages/bernhard/__init__.py\", line 54, in read_exactly\r\n  File \"/home/argus/venv/bin/glances\", line 9, in <module>\r\n    load_entry_point('Glances==2.6', 'console_scripts', 'glances')()\r\n  File \"/home/argus/venv/local/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/__init__.py\", line 133, in main\r\n    standalone.serve_forever()\r\n  File \"/home/argus/venv/local/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/standalone.py\", line 107, in serve_forever\r\n    return self.__serve_forever()\r\n  File \"/home/argus/venv/local/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/standalone.py\", line 92, in __serve_forever\r\n    self.screen.update(self.stats)\r\n  File \"/home/argus/venv/local/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/outputs/glances_curses.py\", line 975, in update\r\n    self.flush(stats, cs_status=cs_status)\r\n  File \"/home/argus/venv/local/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/outputs/glances_curses.py\", line 953, in flush\r\n    self.display(stats, cs_status=cs_status)\r\n  File \"/home/argus/venv/local/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/outputs/glances_curses.py\", line 524, in display\r\n    args=self.args, max_width=plugin_max_width)\r\n  File \"/home/argus/venv/local/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/plugins/glances_plugin.py\", line 555, in get_stats_display\r\n    'msgdict': self.msg_curse(args),\r\n  File \"/home/argus/venv/lib/python2.7/site-packages/Glances-2.6-py2.7.egg/glances/plugins/glances_fs.py\", line 229, in msg_curse\r\n    for i in sorted(self.stats, key=comparsion_key):\r\nTypeError: string indices must be integers, not str\r\n```\r\n\r\nI'm working on finding the root-cause for the issue. I'll post it here if I find.\r\n\r\n#### Possible solution\r\n\r\nUse  `isinstance(x, dict)` for all the items to check if it is a proper `comparsion_key` **or** avoid adding a non-dict instance to the list.\r\n\r\n#### Versions\r\n\r\n* Glances: `Glances v2.7_BETA`\r\n* PSutil: `psutil v4.1.0`\r\n* OS info:\r\n```\r\nDistributor ID: Ubuntu\r\nDescription:    Ubuntu 14.04.3 LTS\r\nRelease:        14.04\r\nCodename:       trusty\r\n```\r\n\r\n#### Logs\r\n\r\nNo related logs available in `glances.log`.\r\n"}}