{"action":"closed","number":19,"pull_request":{"url":"https://api.github.com/repos/asweigart/pyperclip/pulls/19","id":35808760,"html_url":"https://github.com/asweigart/pyperclip/pull/19","diff_url":"https://github.com/asweigart/pyperclip/pull/19.diff","patch_url":"https://github.com/asweigart/pyperclip/pull/19.patch","issue_url":"https://api.github.com/repos/asweigart/pyperclip/issues/19","number":19,"state":"closed","locked":false,"title":"fix returned values, when sys.getdefaultencoding() is ascii","user":{"login":"drakulavich","id":129260,"avatar_url":"https://avatars.githubusercontent.com/u/129260?v=3","gravatar_id":"","url":"https://api.github.com/users/drakulavich","html_url":"https://github.com/drakulavich","followers_url":"https://api.github.com/users/drakulavich/followers","following_url":"https://api.github.com/users/drakulavich/following{/other_user}","gists_url":"https://api.github.com/users/drakulavich/gists{/gist_id}","starred_url":"https://api.github.com/users/drakulavich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drakulavich/subscriptions","organizations_url":"https://api.github.com/users/drakulavich/orgs","repos_url":"https://api.github.com/users/drakulavich/repos","events_url":"https://api.github.com/users/drakulavich/events{/privacy}","received_events_url":"https://api.github.com/users/drakulavich/received_events","type":"User","site_admin":false},"body":"Hi there!\r\n\r\nI've found a problem, when I tried to run pyperclip on Ubuntu Linux.\r\n\r\nSteps to reproduce the problem:\r\n1. Create virtualenv environment.\r\n2. Install pyperclip package via pip inside this environment.\r\n3. pyperclip.paste() give an error like:\r\n\r\n```\r\n/local/lib/python2.7/site-packages/pyperclip/__init__.py\", line 126, in _pasteXclip\r\n    return bytes.decode(stdout)\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 8: ordinal not in range(128)\r\n```\r\n\r\nThe reason is that **gtk** module is not imported inside env. gtk module changed default encoding to utf-8, therefore pyperclip is working when installed in the system directory:\r\n```\r\nsudo pip install pyperclip \r\n```","created_at":"2015-05-20T08:34:36Z","updated_at":"2015-05-23T00:37:52Z","closed_at":"2015-05-23T00:37:52Z","merged_at":"2015-05-23T00:37:52Z","merge_commit_sha":"1c9d563d94c38c94c0012316b8fde455e4cde69a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/asweigart/pyperclip/pulls/19/commits","review_comments_url":"https://api.github.com/repos/asweigart/pyperclip/pulls/19/comments","review_comment_url":"https://api.github.com/repos/asweigart/pyperclip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/asweigart/pyperclip/issues/19/comments","statuses_url":"https://api.github.com/repos/asweigart/pyperclip/statuses/2448b252d3090a0d7f630cd39d7a561bd692eb6c","head":{"label":"drakulavich:master","ref":"master","sha":"2448b252d3090a0d7f630cd39d7a561bd692eb6c","user":{"login":"drakulavich","id":129260,"avatar_url":"https://avatars.githubusercontent.com/u/129260?v=3","gravatar_id":"","url":"https://api.github.com/users/drakulavich","html_url":"https://github.com/drakulavich","followers_url":"https://api.github.com/users/drakulavich/followers","following_url":"https://api.github.com/users/drakulavich/following{/other_user}","gists_url":"https://api.github.com/users/drakulavich/gists{/gist_id}","starred_url":"https://api.github.com/users/drakulavich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drakulavich/subscriptions","organizations_url":"https://api.github.com/users/drakulavich/orgs","repos_url":"https://api.github.com/users/drakulavich/repos","events_url":"https://api.github.com/users/drakulavich/events{/privacy}","received_events_url":"https://api.github.com/users/drakulavich/received_events","type":"User","site_admin":false},"repo":{"id":35934842,"name":"pyperclip","full_name":"drakulavich/pyperclip","owner":{"login":"drakulavich","id":129260,"avatar_url":"https://avatars.githubusercontent.com/u/129260?v=3","gravatar_id":"","url":"https://api.github.com/users/drakulavich","html_url":"https://github.com/drakulavich","followers_url":"https://api.github.com/users/drakulavich/followers","following_url":"https://api.github.com/users/drakulavich/following{/other_user}","gists_url":"https://api.github.com/users/drakulavich/gists{/gist_id}","starred_url":"https://api.github.com/users/drakulavich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drakulavich/subscriptions","organizations_url":"https://api.github.com/users/drakulavich/orgs","repos_url":"https://api.github.com/users/drakulavich/repos","events_url":"https://api.github.com/users/drakulavich/events{/privacy}","received_events_url":"https://api.github.com/users/drakulavich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drakulavich/pyperclip","description":"Python module for cross-platform clipboard functions.","fork":true,"url":"https://api.github.com/repos/drakulavich/pyperclip","forks_url":"https://api.github.com/repos/drakulavich/pyperclip/forks","keys_url":"https://api.github.com/repos/drakulavich/pyperclip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drakulavich/pyperclip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drakulavich/pyperclip/teams","hooks_url":"https://api.github.com/repos/drakulavich/pyperclip/hooks","issue_events_url":"https://api.github.com/repos/drakulavich/pyperclip/issues/events{/number}","events_url":"https://api.github.com/repos/drakulavich/pyperclip/events","assignees_url":"https://api.github.com/repos/drakulavich/pyperclip/assignees{/user}","branches_url":"https://api.github.com/repos/drakulavich/pyperclip/branches{/branch}","tags_url":"https://api.github.com/repos/drakulavich/pyperclip/tags","blobs_url":"https://api.github.com/repos/drakulavich/pyperclip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drakulavich/pyperclip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drakulavich/pyperclip/git/refs{/sha}","trees_url":"https://api.github.com/repos/drakulavich/pyperclip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drakulavich/pyperclip/statuses/{sha}","languages_url":"https://api.github.com/repos/drakulavich/pyperclip/languages","stargazers_url":"https://api.github.com/repos/drakulavich/pyperclip/stargazers","contributors_url":"https://api.github.com/repos/drakulavich/pyperclip/contributors","subscribers_url":"https://api.github.com/repos/drakulavich/pyperclip/subscribers","subscription_url":"https://api.github.com/repos/drakulavich/pyperclip/subscription","commits_url":"https://api.github.com/repos/drakulavich/pyperclip/commits{/sha}","git_commits_url":"https://api.github.com/repos/drakulavich/pyperclip/git/commits{/sha}","comments_url":"https://api.github.com/repos/drakulavich/pyperclip/comments{/number}","issue_comment_url":"https://api.github.com/repos/drakulavich/pyperclip/issues/comments{/number}","contents_url":"https://api.github.com/repos/drakulavich/pyperclip/contents/{+path}","compare_url":"https://api.github.com/repos/drakulavich/pyperclip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drakulavich/pyperclip/merges","archive_url":"https://api.github.com/repos/drakulavich/pyperclip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drakulavich/pyperclip/downloads","issues_url":"https://api.github.com/repos/drakulavich/pyperclip/issues{/number}","pulls_url":"https://api.github.com/repos/drakulavich/pyperclip/pulls{/number}","milestones_url":"https://api.github.com/repos/drakulavich/pyperclip/milestones{/number}","notifications_url":"https://api.github.com/repos/drakulavich/pyperclip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drakulavich/pyperclip/labels{/name}","releases_url":"https://api.github.com/repos/drakulavich/pyperclip/releases{/id}","created_at":"2015-05-20T08:10:54Z","updated_at":"2015-05-20T08:10:55Z","pushed_at":"2015-05-20T08:19:28Z","git_url":"git://github.com/drakulavich/pyperclip.git","ssh_url":"git@github.com:drakulavich/pyperclip.git","clone_url":"https://github.com/drakulavich/pyperclip.git","svn_url":"https://github.com/drakulavich/pyperclip","homepage":"http://coffeeghost.net/2010/10/09/pyperclip-a-cross-platform-clipboard-module-for-python/","size":117,"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":"asweigart:master","ref":"master","sha":"2c0d2c4e2d5e1dbe45819cd5d20c5a8e88bcad7d","user":{"login":"asweigart","id":52220,"avatar_url":"https://avatars.githubusercontent.com/u/52220?v=3","gravatar_id":"","url":"https://api.github.com/users/asweigart","html_url":"https://github.com/asweigart","followers_url":"https://api.github.com/users/asweigart/followers","following_url":"https://api.github.com/users/asweigart/following{/other_user}","gists_url":"https://api.github.com/users/asweigart/gists{/gist_id}","starred_url":"https://api.github.com/users/asweigart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asweigart/subscriptions","organizations_url":"https://api.github.com/users/asweigart/orgs","repos_url":"https://api.github.com/users/asweigart/repos","events_url":"https://api.github.com/users/asweigart/events{/privacy}","received_events_url":"https://api.github.com/users/asweigart/received_events","type":"User","site_admin":false},"repo":{"id":1897743,"name":"pyperclip","full_name":"asweigart/pyperclip","owner":{"login":"asweigart","id":52220,"avatar_url":"https://avatars.githubusercontent.com/u/52220?v=3","gravatar_id":"","url":"https://api.github.com/users/asweigart","html_url":"https://github.com/asweigart","followers_url":"https://api.github.com/users/asweigart/followers","following_url":"https://api.github.com/users/asweigart/following{/other_user}","gists_url":"https://api.github.com/users/asweigart/gists{/gist_id}","starred_url":"https://api.github.com/users/asweigart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asweigart/subscriptions","organizations_url":"https://api.github.com/users/asweigart/orgs","repos_url":"https://api.github.com/users/asweigart/repos","events_url":"https://api.github.com/users/asweigart/events{/privacy}","received_events_url":"https://api.github.com/users/asweigart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asweigart/pyperclip","description":"Python module for cross-platform clipboard functions.","fork":false,"url":"https://api.github.com/repos/asweigart/pyperclip","forks_url":"https://api.github.com/repos/asweigart/pyperclip/forks","keys_url":"https://api.github.com/repos/asweigart/pyperclip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asweigart/pyperclip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asweigart/pyperclip/teams","hooks_url":"https://api.github.com/repos/asweigart/pyperclip/hooks","issue_events_url":"https://api.github.com/repos/asweigart/pyperclip/issues/events{/number}","events_url":"https://api.github.com/repos/asweigart/pyperclip/events","assignees_url":"https://api.github.com/repos/asweigart/pyperclip/assignees{/user}","branches_url":"https://api.github.com/repos/asweigart/pyperclip/branches{/branch}","tags_url":"https://api.github.com/repos/asweigart/pyperclip/tags","blobs_url":"https://api.github.com/repos/asweigart/pyperclip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asweigart/pyperclip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asweigart/pyperclip/git/refs{/sha}","trees_url":"https://api.github.com/repos/asweigart/pyperclip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asweigart/pyperclip/statuses/{sha}","languages_url":"https://api.github.com/repos/asweigart/pyperclip/languages","stargazers_url":"https://api.github.com/repos/asweigart/pyperclip/stargazers","contributors_url":"https://api.github.com/repos/asweigart/pyperclip/contributors","subscribers_url":"https://api.github.com/repos/asweigart/pyperclip/subscribers","subscription_url":"https://api.github.com/repos/asweigart/pyperclip/subscription","commits_url":"https://api.github.com/repos/asweigart/pyperclip/commits{/sha}","git_commits_url":"https://api.github.com/repos/asweigart/pyperclip/git/commits{/sha}","comments_url":"https://api.github.com/repos/asweigart/pyperclip/comments{/number}","issue_comment_url":"https://api.github.com/repos/asweigart/pyperclip/issues/comments{/number}","contents_url":"https://api.github.com/repos/asweigart/pyperclip/contents/{+path}","compare_url":"https://api.github.com/repos/asweigart/pyperclip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asweigart/pyperclip/merges","archive_url":"https://api.github.com/repos/asweigart/pyperclip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asweigart/pyperclip/downloads","issues_url":"https://api.github.com/repos/asweigart/pyperclip/issues{/number}","pulls_url":"https://api.github.com/repos/asweigart/pyperclip/pulls{/number}","milestones_url":"https://api.github.com/repos/asweigart/pyperclip/milestones{/number}","notifications_url":"https://api.github.com/repos/asweigart/pyperclip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asweigart/pyperclip/labels{/name}","releases_url":"https://api.github.com/repos/asweigart/pyperclip/releases{/id}","created_at":"2011-06-15T01:12:04Z","updated_at":"2015-05-22T02:16:19Z","pushed_at":"2015-05-23T00:37:52Z","git_url":"git://github.com/asweigart/pyperclip.git","ssh_url":"git@github.com:asweigart/pyperclip.git","clone_url":"https://github.com/asweigart/pyperclip.git","svn_url":"https://github.com/asweigart/pyperclip","homepage":"http://coffeeghost.net/2010/10/09/pyperclip-a-cross-platform-clipboard-module-for-python/","size":293,"stargazers_count":49,"watchers_count":49,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":6,"forks":14,"open_issues":6,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/asweigart/pyperclip/pulls/19"},"html":{"href":"https://github.com/asweigart/pyperclip/pull/19"},"issue":{"href":"https://api.github.com/repos/asweigart/pyperclip/issues/19"},"comments":{"href":"https://api.github.com/repos/asweigart/pyperclip/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/asweigart/pyperclip/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/asweigart/pyperclip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/asweigart/pyperclip/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/asweigart/pyperclip/statuses/2448b252d3090a0d7f630cd39d7a561bd692eb6c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"asweigart","id":52220,"avatar_url":"https://avatars.githubusercontent.com/u/52220?v=3","gravatar_id":"","url":"https://api.github.com/users/asweigart","html_url":"https://github.com/asweigart","followers_url":"https://api.github.com/users/asweigart/followers","following_url":"https://api.github.com/users/asweigart/following{/other_user}","gists_url":"https://api.github.com/users/asweigart/gists{/gist_id}","starred_url":"https://api.github.com/users/asweigart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asweigart/subscriptions","organizations_url":"https://api.github.com/users/asweigart/orgs","repos_url":"https://api.github.com/users/asweigart/repos","events_url":"https://api.github.com/users/asweigart/events{/privacy}","received_events_url":"https://api.github.com/users/asweigart/received_events","type":"User","site_admin":false},"comments":8,"review_comments":0,"commits":1,"additions":3,"deletions":3,"changed_files":1}}