{"action":"opened","number":94,"pull_request":{"url":"https://api.github.com/repos/mooz/percol/pulls/94","id":110670396,"html_url":"https://github.com/mooz/percol/pull/94","diff_url":"https://github.com/mooz/percol/pull/94.diff","patch_url":"https://github.com/mooz/percol/pull/94.patch","issue_url":"https://api.github.com/repos/mooz/percol/issues/94","number":94,"state":"open","locked":false,"title":"When locale is not initialized, skip setlocale","user":{"login":"quiver","id":266641,"avatar_url":"https://avatars0.githubusercontent.com/u/266641?v=3","gravatar_id":"","url":"https://api.github.com/users/quiver","html_url":"https://github.com/quiver","followers_url":"https://api.github.com/users/quiver/followers","following_url":"https://api.github.com/users/quiver/following{/other_user}","gists_url":"https://api.github.com/users/quiver/gists{/gist_id}","starred_url":"https://api.github.com/users/quiver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiver/subscriptions","organizations_url":"https://api.github.com/users/quiver/orgs","repos_url":"https://api.github.com/users/quiver/repos","events_url":"https://api.github.com/users/quiver/events{/privacy}","received_events_url":"https://api.github.com/users/quiver/received_events","type":"User","site_admin":false},"body":"When locale is not initialized, locale.setlocale(locale.LC_ALL, '') fails.\r\nIn that case, just skip setlocale process. Fixes #93 \r\n\r\n# Real World Situation\r\n\r\nOn Mac, LC_CTYPE is sometimes set to UTF-8. (https://www.cyberciti.biz/faq/os-x-terminal-bash-warning-setlocale-lc_ctype-cannot-change-locale/)\r\n\r\nWhen you ssh to Linux servers, your local machine's LC_CTYPE is used on that remote server.\r\nSince Linux does not recognize `UTF-8` as a proper `LC_CTYPE`, locale initialization fails. If you proceed to run `locale.setlocale(locale.LC_ALL, '')`, you'll encounter errors as described in #93 .\r\n\r\n# How To Reproduce The Error\r\n\r\n## Linux\r\n```\r\n$ LC_CTYPE=UTF-8 percol\r\n-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory\r\nTraceback (most recent call last):\r\n  File \"/home/ec2-user/demo/bin/percol\", line 14, in <module>\r\n    main()\r\n  File \"/home/ec2-user/demo/local/lib/python2.7/site-packages/percol/cli.py\", line 190, in main\r\n    output_encoding = set_proper_locale(options)\r\n  File \"/home/ec2-user/demo/local/lib/python2.7/site-packages/percol/cli.py\", line 122, in set_proper_locale\r\n    locale.setlocale(locale.LC_ALL, '')\r\n  File \"/home/ec2-user/demo/lib64/python2.7/locale.py\", line 581, in setlocale\r\n    return _setlocale(category, locale)\r\nlocale.Error: unsupported locale setting\r\n```\r\n## Mac\r\n```\r\n@mac$ LC_CTYPE=UTF-8 ssh REMOTE-SERVER\r\n@linux$ percol\r\nTraceback (most recent call last):\r\n...\r\n```","created_at":"2017-03-14T17:03:46Z","updated_at":"2017-03-14T17:03:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mooz/percol/pulls/94/commits","review_comments_url":"https://api.github.com/repos/mooz/percol/pulls/94/comments","review_comment_url":"https://api.github.com/repos/mooz/percol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mooz/percol/issues/94/comments","statuses_url":"https://api.github.com/repos/mooz/percol/statuses/11c8c1b66dfa4d3c8a366da1a9aaad0a2242e309","head":{"label":"quiver:fix-locale-setting","ref":"fix-locale-setting","sha":"11c8c1b66dfa4d3c8a366da1a9aaad0a2242e309","user":{"login":"quiver","id":266641,"avatar_url":"https://avatars0.githubusercontent.com/u/266641?v=3","gravatar_id":"","url":"https://api.github.com/users/quiver","html_url":"https://github.com/quiver","followers_url":"https://api.github.com/users/quiver/followers","following_url":"https://api.github.com/users/quiver/following{/other_user}","gists_url":"https://api.github.com/users/quiver/gists{/gist_id}","starred_url":"https://api.github.com/users/quiver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiver/subscriptions","organizations_url":"https://api.github.com/users/quiver/orgs","repos_url":"https://api.github.com/users/quiver/repos","events_url":"https://api.github.com/users/quiver/events{/privacy}","received_events_url":"https://api.github.com/users/quiver/received_events","type":"User","site_admin":false},"repo":{"id":84972828,"name":"percol","full_name":"quiver/percol","owner":{"login":"quiver","id":266641,"avatar_url":"https://avatars0.githubusercontent.com/u/266641?v=3","gravatar_id":"","url":"https://api.github.com/users/quiver","html_url":"https://github.com/quiver","followers_url":"https://api.github.com/users/quiver/followers","following_url":"https://api.github.com/users/quiver/following{/other_user}","gists_url":"https://api.github.com/users/quiver/gists{/gist_id}","starred_url":"https://api.github.com/users/quiver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiver/subscriptions","organizations_url":"https://api.github.com/users/quiver/orgs","repos_url":"https://api.github.com/users/quiver/repos","events_url":"https://api.github.com/users/quiver/events{/privacy}","received_events_url":"https://api.github.com/users/quiver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quiver/percol","description":"adds flavor of interactive filtering to the traditional pipe concept of UNIX shell","fork":true,"url":"https://api.github.com/repos/quiver/percol","forks_url":"https://api.github.com/repos/quiver/percol/forks","keys_url":"https://api.github.com/repos/quiver/percol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quiver/percol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quiver/percol/teams","hooks_url":"https://api.github.com/repos/quiver/percol/hooks","issue_events_url":"https://api.github.com/repos/quiver/percol/issues/events{/number}","events_url":"https://api.github.com/repos/quiver/percol/events","assignees_url":"https://api.github.com/repos/quiver/percol/assignees{/user}","branches_url":"https://api.github.com/repos/quiver/percol/branches{/branch}","tags_url":"https://api.github.com/repos/quiver/percol/tags","blobs_url":"https://api.github.com/repos/quiver/percol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quiver/percol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quiver/percol/git/refs{/sha}","trees_url":"https://api.github.com/repos/quiver/percol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quiver/percol/statuses/{sha}","languages_url":"https://api.github.com/repos/quiver/percol/languages","stargazers_url":"https://api.github.com/repos/quiver/percol/stargazers","contributors_url":"https://api.github.com/repos/quiver/percol/contributors","subscribers_url":"https://api.github.com/repos/quiver/percol/subscribers","subscription_url":"https://api.github.com/repos/quiver/percol/subscription","commits_url":"https://api.github.com/repos/quiver/percol/commits{/sha}","git_commits_url":"https://api.github.com/repos/quiver/percol/git/commits{/sha}","comments_url":"https://api.github.com/repos/quiver/percol/comments{/number}","issue_comment_url":"https://api.github.com/repos/quiver/percol/issues/comments{/number}","contents_url":"https://api.github.com/repos/quiver/percol/contents/{+path}","compare_url":"https://api.github.com/repos/quiver/percol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quiver/percol/merges","archive_url":"https://api.github.com/repos/quiver/percol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quiver/percol/downloads","issues_url":"https://api.github.com/repos/quiver/percol/issues{/number}","pulls_url":"https://api.github.com/repos/quiver/percol/pulls{/number}","milestones_url":"https://api.github.com/repos/quiver/percol/milestones{/number}","notifications_url":"https://api.github.com/repos/quiver/percol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quiver/percol/labels{/name}","releases_url":"https://api.github.com/repos/quiver/percol/releases{/id}","deployments_url":"https://api.github.com/repos/quiver/percol/deployments","created_at":"2017-03-14T16:36:20Z","updated_at":"2017-03-14T16:36:22Z","pushed_at":"2017-03-14T16:53:54Z","git_url":"git://github.com/quiver/percol.git","ssh_url":"git@github.com:quiver/percol.git","clone_url":"https://github.com/quiver/percol.git","svn_url":"https://github.com/quiver/percol","homepage":"","size":1125,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mooz:master","ref":"master","sha":"c2b92ab230a21d184a696cc00d1c41dd0e7a8c12","user":{"login":"mooz","id":40159,"avatar_url":"https://avatars3.githubusercontent.com/u/40159?v=3","gravatar_id":"","url":"https://api.github.com/users/mooz","html_url":"https://github.com/mooz","followers_url":"https://api.github.com/users/mooz/followers","following_url":"https://api.github.com/users/mooz/following{/other_user}","gists_url":"https://api.github.com/users/mooz/gists{/gist_id}","starred_url":"https://api.github.com/users/mooz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mooz/subscriptions","organizations_url":"https://api.github.com/users/mooz/orgs","repos_url":"https://api.github.com/users/mooz/repos","events_url":"https://api.github.com/users/mooz/events{/privacy}","received_events_url":"https://api.github.com/users/mooz/received_events","type":"User","site_admin":false},"repo":{"id":1418453,"name":"percol","full_name":"mooz/percol","owner":{"login":"mooz","id":40159,"avatar_url":"https://avatars3.githubusercontent.com/u/40159?v=3","gravatar_id":"","url":"https://api.github.com/users/mooz","html_url":"https://github.com/mooz","followers_url":"https://api.github.com/users/mooz/followers","following_url":"https://api.github.com/users/mooz/following{/other_user}","gists_url":"https://api.github.com/users/mooz/gists{/gist_id}","starred_url":"https://api.github.com/users/mooz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mooz/subscriptions","organizations_url":"https://api.github.com/users/mooz/orgs","repos_url":"https://api.github.com/users/mooz/repos","events_url":"https://api.github.com/users/mooz/events{/privacy}","received_events_url":"https://api.github.com/users/mooz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mooz/percol","description":"adds flavor of interactive filtering to the traditional pipe concept of UNIX shell","fork":false,"url":"https://api.github.com/repos/mooz/percol","forks_url":"https://api.github.com/repos/mooz/percol/forks","keys_url":"https://api.github.com/repos/mooz/percol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mooz/percol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mooz/percol/teams","hooks_url":"https://api.github.com/repos/mooz/percol/hooks","issue_events_url":"https://api.github.com/repos/mooz/percol/issues/events{/number}","events_url":"https://api.github.com/repos/mooz/percol/events","assignees_url":"https://api.github.com/repos/mooz/percol/assignees{/user}","branches_url":"https://api.github.com/repos/mooz/percol/branches{/branch}","tags_url":"https://api.github.com/repos/mooz/percol/tags","blobs_url":"https://api.github.com/repos/mooz/percol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mooz/percol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mooz/percol/git/refs{/sha}","trees_url":"https://api.github.com/repos/mooz/percol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mooz/percol/statuses/{sha}","languages_url":"https://api.github.com/repos/mooz/percol/languages","stargazers_url":"https://api.github.com/repos/mooz/percol/stargazers","contributors_url":"https://api.github.com/repos/mooz/percol/contributors","subscribers_url":"https://api.github.com/repos/mooz/percol/subscribers","subscription_url":"https://api.github.com/repos/mooz/percol/subscription","commits_url":"https://api.github.com/repos/mooz/percol/commits{/sha}","git_commits_url":"https://api.github.com/repos/mooz/percol/git/commits{/sha}","comments_url":"https://api.github.com/repos/mooz/percol/comments{/number}","issue_comment_url":"https://api.github.com/repos/mooz/percol/issues/comments{/number}","contents_url":"https://api.github.com/repos/mooz/percol/contents/{+path}","compare_url":"https://api.github.com/repos/mooz/percol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mooz/percol/merges","archive_url":"https://api.github.com/repos/mooz/percol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mooz/percol/downloads","issues_url":"https://api.github.com/repos/mooz/percol/issues{/number}","pulls_url":"https://api.github.com/repos/mooz/percol/pulls{/number}","milestones_url":"https://api.github.com/repos/mooz/percol/milestones{/number}","notifications_url":"https://api.github.com/repos/mooz/percol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mooz/percol/labels{/name}","releases_url":"https://api.github.com/repos/mooz/percol/releases{/id}","deployments_url":"https://api.github.com/repos/mooz/percol/deployments","created_at":"2011-02-27T17:08:29Z","updated_at":"2017-03-14T15:08:38Z","pushed_at":"2016-01-24T11:27:50Z","git_url":"git://github.com/mooz/percol.git","ssh_url":"git@github.com:mooz/percol.git","clone_url":"https://github.com/mooz/percol.git","svn_url":"https://github.com/mooz/percol","homepage":"","size":1125,"stargazers_count":2265,"watchers_count":2265,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":104,"mirror_url":null,"open_issues_count":32,"forks":104,"open_issues":32,"watchers":2265,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mooz/percol/pulls/94"},"html":{"href":"https://github.com/mooz/percol/pull/94"},"issue":{"href":"https://api.github.com/repos/mooz/percol/issues/94"},"comments":{"href":"https://api.github.com/repos/mooz/percol/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/mooz/percol/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/mooz/percol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mooz/percol/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/mooz/percol/statuses/11c8c1b66dfa4d3c8a366da1a9aaad0a2242e309"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":4,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"quiver"}}