{"action":"created","issue":{"url":"https://api.github.com/repos/nvbn/thefuck/issues/161","labels_url":"https://api.github.com/repos/nvbn/thefuck/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/nvbn/thefuck/issues/161/comments","events_url":"https://api.github.com/repos/nvbn/thefuck/issues/161/events","html_url":"https://github.com/nvbn/thefuck/issues/161","id":73353640,"number":161,"title":"TypeError: 'Process' object is not callable","user":{"login":"ChillarAnand","id":4463796,"avatar_url":"https://avatars.githubusercontent.com/u/4463796?v=3","gravatar_id":"","url":"https://api.github.com/users/ChillarAnand","html_url":"https://github.com/ChillarAnand","followers_url":"https://api.github.com/users/ChillarAnand/followers","following_url":"https://api.github.com/users/ChillarAnand/following{/other_user}","gists_url":"https://api.github.com/users/ChillarAnand/gists{/gist_id}","starred_url":"https://api.github.com/users/ChillarAnand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChillarAnand/subscriptions","organizations_url":"https://api.github.com/users/ChillarAnand/orgs","repos_url":"https://api.github.com/users/ChillarAnand/repos","events_url":"https://api.github.com/users/ChillarAnand/events{/privacy}","received_events_url":"https://api.github.com/users/ChillarAnand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-05T15:55:29Z","updated_at":"2015-05-11T11:54:15Z","closed_at":null,"body":"i have installed thefuck but when i run fuck i am getting this error\r\n\r\n```\r\n# anand at anand-X550EA in ~ [21:23:06]\r\n$ apt-get install vim\r\nE: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)\r\nE: Unable to lock the administration directory (/var/lib/dpkg/), are you root?\r\n\r\n# anand at anand-X550EA in ~ [21:23:10]\r\n$ fuck\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/thefuck\", line 9, in <module>\r\n    load_entry_point('thefuck==1.35', 'console_scripts', 'thefuck')()\r\n  File \"/usr/local/lib/python2.7/dist-packages/thefuck/main.py\", line 125, in main\r\n    command = get_command(settings, sys.argv)\r\n  File \"/usr/local/lib/python2.7/dist-packages/thefuck/main.py\", line 73, in get_command\r\n    script = shells.from_shell(script)\r\n  File \"/usr/local/lib/python2.7/dist-packages/thefuck/shells.py\", line 108, in from_shell\r\n    return _get_shell().from_shell(command)\r\n  File \"/usr/local/lib/python2.7/dist-packages/thefuck/shells.py\", line 103, in _get_shell\r\n    shell = Process(os.getpid()).parent().cmdline()[0]\r\nTypeError: 'Process' object is not callable\r\n\r\n# anand at anand-X550EA in ~ [21:23:13]\r\n$ \r\n```"},"comment":{"url":"https://api.github.com/repos/nvbn/thefuck/issues/comments/100885367","html_url":"https://github.com/nvbn/thefuck/issues/161#issuecomment-100885367","issue_url":"https://api.github.com/repos/nvbn/thefuck/issues/161","id":100885367,"user":{"login":"smaniato","id":2285973,"avatar_url":"https://avatars.githubusercontent.com/u/2285973?v=3","gravatar_id":"","url":"https://api.github.com/users/smaniato","html_url":"https://github.com/smaniato","followers_url":"https://api.github.com/users/smaniato/followers","following_url":"https://api.github.com/users/smaniato/following{/other_user}","gists_url":"https://api.github.com/users/smaniato/gists{/gist_id}","starred_url":"https://api.github.com/users/smaniato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smaniato/subscriptions","organizations_url":"https://api.github.com/users/smaniato/orgs","repos_url":"https://api.github.com/users/smaniato/repos","events_url":"https://api.github.com/users/smaniato/events{/privacy}","received_events_url":"https://api.github.com/users/smaniato/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T11:54:15Z","updated_at":"2015-05-11T11:54:15Z","body":"This (hopefully temporary) hack in `shells.py` (L102) will get it working:\r\n```python\r\ndef _get_shell():\r\n    shell = Process(os.getpid()).parent().cmdline()[0]\r\n    return shells['bash'] # hardcode 'bash' or 'zsh'\r\n```\r\nThis is what I get when upgrading btw:\r\n```\r\n$ sudo pip install thefuck --upgrade\r\nRequirement already up-to-date: thefuck in /usr/local/lib/python2.7/dist-packages\r\nCleaning up...\r\n```"}}