{"action":"created","issue":{"url":"https://api.github.com/repos/nicolargo/glances/issues/885","repository_url":"https://api.github.com/repos/nicolargo/glances","labels_url":"https://api.github.com/repos/nicolargo/glances/issues/885/labels{/name}","comments_url":"https://api.github.com/repos/nicolargo/glances/issues/885/comments","events_url":"https://api.github.com/repos/nicolargo/glances/issues/885/events","html_url":"https://github.com/nicolargo/glances/issues/885","id":164972316,"number":885,"title":"PermissionError/OSError when starting glances","user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars.githubusercontent.com/u/3019665?v=3","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nicolargo/glances/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/nicolargo/glances/labels/needs%20test","name":"needs test","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/nicolargo/glances/milestones/25","html_url":"https://github.com/nicolargo/glances/milestones/2.7","labels_url":"https://api.github.com/repos/nicolargo/glances/milestones/25/labels","id":1650430,"number":25,"title":"2.7","description":"","creator":{"login":"nicolargo","id":776747,"avatar_url":"https://avatars.githubusercontent.com/u/776747?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolargo","html_url":"https://github.com/nicolargo","followers_url":"https://api.github.com/users/nicolargo/followers","following_url":"https://api.github.com/users/nicolargo/following{/other_user}","gists_url":"https://api.github.com/users/nicolargo/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolargo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolargo/subscriptions","organizations_url":"https://api.github.com/users/nicolargo/orgs","repos_url":"https://api.github.com/users/nicolargo/repos","events_url":"https://api.github.com/users/nicolargo/events{/privacy}","received_events_url":"https://api.github.com/users/nicolargo/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":35,"state":"open","created_at":"2016-03-17T08:02:40Z","updated_at":"2016-07-12T15:53:01Z","due_on":"2016-08-31T22:00:00Z","closed_at":null},"comments":8,"created_at":"2016-07-12T01:02:51Z","updated_at":"2016-07-12T16:46:04Z","closed_at":null,"body":"When trying to start up `glances`, it crashes due to a `PermissionError` or `OSError` (on Python 2.x). Traceback is shown below. I have tried a few different versions of `glances` and `psutil`. If I revert back to `psutil` version `2.2.1`, the issue goes away. Though my guess is that is only because this code path is not present there. It is probably possible to get around this issue by running with `sudo`. However, that is really not an option for the machine I'm trying to use this on. I used `conda` to install these from `conda-forge`. So, it should be reproducible that way.\r\n\r\n```\r\n$ lsb_release -a\r\nLSB Version:\t:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch\r\nDistributor ID:\tScientific\r\nDescription:\tScientific Linux release 6.3 (Carbon)\r\nRelease:\t6.3\r\nCodename:\tCarbon\r\n$ glances -V\r\nGlances v2.6.2 with psutil v4.3.0\r\n$ glances \r\nTraceback (most recent call last):\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/bin/glances\", line 6, in <module>\r\n    sys.exit(glances.main())\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/lib/python3.5/site-packages/glances/__init__.py\", line 130, in main\r\n    args=core.get_args())\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/lib/python3.5/site-packages/glances/standalone.py\", line 67, in __init__\r\n    self.stats.update()\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/lib/python3.5/site-packages/glances/stats.py\", line 154, in update\r\n    self._plugins[p].update()\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/lib/python3.5/site-packages/glances/plugins/glances_plugin.py\", line 658, in wrapper\r\n    ret = fct(*args, **kw)\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/lib/python3.5/site-packages/glances/plugins/glances_network.py\", line 90, in update\r\n    netstatus = psutil.net_if_stats()\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/lib/python3.5/site-packages/psutil/__init__.py\", line 1961, in net_if_stats\r\n    return _psplatform.net_if_stats()\r\n  File \"/groups/dudman/home/kirkhamj/miniconda/envs/nanshenv3/lib/python3.5/site-packages/psutil/_pslinux.py\", line 791, in net_if_stats\r\n    isup, duplex, speed, mtu = cext.net_if_stats(name)\r\nPermissionError: [Errno 1] Operation not permitted\r\n```"},"comment":{"url":"https://api.github.com/repos/nicolargo/glances/issues/comments/232105017","html_url":"https://github.com/nicolargo/glances/issues/885#issuecomment-232105017","issue_url":"https://api.github.com/repos/nicolargo/glances/issues/885","id":232105017,"user":{"login":"jakirkham","id":3019665,"avatar_url":"https://avatars.githubusercontent.com/u/3019665?v=3","gravatar_id":"","url":"https://api.github.com/users/jakirkham","html_url":"https://github.com/jakirkham","followers_url":"https://api.github.com/users/jakirkham/followers","following_url":"https://api.github.com/users/jakirkham/following{/other_user}","gists_url":"https://api.github.com/users/jakirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/jakirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakirkham/subscriptions","organizations_url":"https://api.github.com/users/jakirkham/orgs","repos_url":"https://api.github.com/users/jakirkham/repos","events_url":"https://api.github.com/users/jakirkham/events{/privacy}","received_events_url":"https://api.github.com/users/jakirkham/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T16:44:14Z","updated_at":"2016-07-12T16:44:14Z","body":"So, you are using Docker to test, correct? Are you `root` in your test Docker container? If so, you may be able to reproduce this by creating a new user that has ordinary permissions and switching to it first. Just a thought."}}
{"actor":{"display_login":"jakirkham"}}