{"action":"created","issue":{"url":"https://api.github.com/repos/nicolargo/glances/issues/864","repository_url":"https://api.github.com/repos/nicolargo/glances","labels_url":"https://api.github.com/repos/nicolargo/glances/issues/864/labels{/name}","comments_url":"https://api.github.com/repos/nicolargo/glances/issues/864/comments","events_url":"https://api.github.com/repos/nicolargo/glances/issues/864/events","html_url":"https://github.com/nicolargo/glances/issues/864","id":154423079,"number":864,"title":"TypeError: 'NoneType' object has no attribute '__getitem__'","user":{"login":"oppianmatt","id":48596,"avatar_url":"https://avatars.githubusercontent.com/u/48596?v=3","gravatar_id":"","url":"https://api.github.com/users/oppianmatt","html_url":"https://github.com/oppianmatt","followers_url":"https://api.github.com/users/oppianmatt/followers","following_url":"https://api.github.com/users/oppianmatt/following{/other_user}","gists_url":"https://api.github.com/users/oppianmatt/gists{/gist_id}","starred_url":"https://api.github.com/users/oppianmatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppianmatt/subscriptions","organizations_url":"https://api.github.com/users/oppianmatt/orgs","repos_url":"https://api.github.com/users/oppianmatt/repos","events_url":"https://api.github.com/users/oppianmatt/events{/privacy}","received_events_url":"https://api.github.com/users/oppianmatt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nicolargo/glances/labels/rejected","name":"rejected","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-12T08:17:48Z","updated_at":"2016-05-12T08:41:18Z","closed_at":"2016-05-12T08:28:01Z","body":"#### Description\r\n\r\nLooks like a race condition with docker containers. Sometimes it will throw this exception with stack trace:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/glances\", line 9, in <module>\r\n    load_entry_point('Glances==2.6.1', 'console_scripts', 'glances')()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/__init__.py\", line 133, in main\r\n    standalone.serve_forever()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/standalone.py\", line 107, in serve_forever\r\n    return self.__serve_forever()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/standalone.py\", line 88, in __serve_forever\r\n    self.stats.update()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/stats.py\", line 154, in update\r\n    self._plugins[p].update()\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py\", line 658, in wrapper\r\n    ret = fct(*args, **kw)\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_docker.py\", line 226, in update\r\n    container['memory'] = self.get_docker_memory(container['Id'], self.thread_list[container['Id']].stats)\r\n  File \"/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_docker.py\", line 297, in get_docker_memory\r\n    ret['rss'] = all_stats['memory_stats']['stats']['rss']\r\nTypeError: 'NoneType' object has no attribute '__getitem__'\r\n```\r\n\r\n#### Versions\r\n\r\n* Glances (glances -V): Glances v2.6.1 with psutil v4.1.0\r\n* PSutil (glances -V): Glances v2.6.1 with psutil v4.1.0\r\n* Operating System (lsb_release -a):\r\n\r\n```\r\nDistributor ID: Ubuntu\r\nDescription:    Ubuntu 12.04.5 LTS\r\nRelease:        12.04\r\nCodename:       precise\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/nicolargo/glances/issues/comments/218695267","html_url":"https://github.com/nicolargo/glances/issues/864#issuecomment-218695267","issue_url":"https://api.github.com/repos/nicolargo/glances/issues/864","id":218695267,"user":{"login":"oppianmatt","id":48596,"avatar_url":"https://avatars.githubusercontent.com/u/48596?v=3","gravatar_id":"","url":"https://api.github.com/users/oppianmatt","html_url":"https://github.com/oppianmatt","followers_url":"https://api.github.com/users/oppianmatt/followers","following_url":"https://api.github.com/users/oppianmatt/following{/other_user}","gists_url":"https://api.github.com/users/oppianmatt/gists{/gist_id}","starred_url":"https://api.github.com/users/oppianmatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppianmatt/subscriptions","organizations_url":"https://api.github.com/users/oppianmatt/orgs","repos_url":"https://api.github.com/users/oppianmatt/repos","events_url":"https://api.github.com/users/oppianmatt/events{/privacy}","received_events_url":"https://api.github.com/users/oppianmatt/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T08:41:18Z","updated_at":"2016-05-12T08:41:18Z","body":"using the latest from pip, and using glances especially to monitor docker because glances is awesome at it.\r\n\r\nBut if anyone else sees this and wants to know a workaround, use the docker glances as described."}}