{"action":"created","comment":{"url":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/comments/236446651","pull_request_review_id":178523613,"id":236446651,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjQ0NjY1MQ==","diff_hunk":"@@ -62,10 +63,11 @@ def validate_runtime(cls, required_language, required_runtime):\n             p = subprocess.Popen(cmd,\n                                  cwd=os.getcwd(),\n                                  stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n-            p.communicate()\n+            found_runtime, _ = p.communicate()\n             if p.returncode != 0:\n                 raise MisMatchRuntimeError(language=required_language,\n-                                           required_runtime=required_runtime)\n+                                           required_runtime=required_runtime,\n+                                           found_runtime=str(found_runtime.decode('utf-8')))","path":"aws_lambda_builders/validate.py","position":18,"original_position":18,"commit_id":"e2f529650359c4e697b202f72f030c07a4da47ca","original_commit_id":"e2f529650359c4e697b202f72f030c07a4da47ca","user":{"login":"sanathkr","id":22755571,"node_id":"MDQ6VXNlcjIyNzU1NTcx","avatar_url":"https://avatars3.githubusercontent.com/u/22755571?v=4","gravatar_id":"","url":"https://api.github.com/users/sanathkr","html_url":"https://github.com/sanathkr","followers_url":"https://api.github.com/users/sanathkr/followers","following_url":"https://api.github.com/users/sanathkr/following{/other_user}","gists_url":"https://api.github.com/users/sanathkr/gists{/gist_id}","starred_url":"https://api.github.com/users/sanathkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanathkr/subscriptions","organizations_url":"https://api.github.com/users/sanathkr/orgs","repos_url":"https://api.github.com/users/sanathkr/repos","events_url":"https://api.github.com/users/sanathkr/events{/privacy}","received_events_url":"https://api.github.com/users/sanathkr/received_events","type":"User","site_admin":false},"body":"Is the decode valid in python2.7?","created_at":"2018-11-26T22:09:10Z","updated_at":"2018-11-26T22:10:31Z","html_url":"https://github.com/awslabs/aws-lambda-builders/pull/37#discussion_r236446651","pull_request_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/comments/236446651"},"html":{"href":"https://github.com/awslabs/aws-lambda-builders/pull/37#discussion_r236446651"},"pull_request":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37","id":233710963,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNzEwOTYz","html_url":"https://github.com/awslabs/aws-lambda-builders/pull/37","diff_url":"https://github.com/awslabs/aws-lambda-builders/pull/37.diff","patch_url":"https://github.com/awslabs/aws-lambda-builders/pull/37.patch","issue_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/issues/37","number":37,"state":"open","locked":false,"title":"fix: helpful error messages when runtime mismatch for build","user":{"login":"TheSriram","id":3770774,"node_id":"MDQ6VXNlcjM3NzA3NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3770774?v=4","gravatar_id":"","url":"https://api.github.com/users/TheSriram","html_url":"https://github.com/TheSriram","followers_url":"https://api.github.com/users/TheSriram/followers","following_url":"https://api.github.com/users/TheSriram/following{/other_user}","gists_url":"https://api.github.com/users/TheSriram/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSriram/subscriptions","organizations_url":"https://api.github.com/users/TheSriram/orgs","repos_url":"https://api.github.com/users/TheSriram/repos","events_url":"https://api.github.com/users/TheSriram/events{/privacy}","received_events_url":"https://api.github.com/users/TheSriram/received_events","type":"User","site_admin":false},"body":"* When trying to build python2.7 lambda applications from within a sam installation housed in a python3.6 environment, one sees the following error message.\r\n\r\n```bash\r\n(venv) srirammv@localrainbow:~/sam-app$sam build\r\n2018-11-26 13:40:16 Building resource 'HelloWorldFunction'\r\nBuild Failed\r\nError: python executable found in your path does not match runtime.\r\n Expected version: python2.7, Found version: python3.6.\r\n Consider moving python2.7 up path hierarchy.\r\n Possibly related: https://github.com/awslabs/aws-lambda-builders/issues/30\r\n```\r\nFixing this involves following steps:\r\n\r\n* Moving up python executable of version python2.7 on the path\r\n```\r\nexport PATH=/usr/bin:$PATH\r\n```\r\n\r\n```\r\n(venv) srirammv@localrainbow::~/sam-app$sam build\r\n2018-11-26 13:58:56 Building resource 'HelloWorldFunction'\r\n2018-11-26 13:58:56 Running PythonPipBuilder:ResolveDependencies\r\n2018-11-26 13:58:57 Running PythonPipBuilder:CopySource\r\n\r\nBuild Succeeded\r\n\r\nBuilt Artifacts  : .aws-sam/build\r\nBuilt Template   : .aws-sam/build/template.yaml\r\n\r\nCommands you can use next\r\n=========================\r\n[*] Invoke Function: sam local invoke\r\n[*] Package: sam package --s3-bucket <yourbucket>\r\n```\r\n\r\nBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.\r\n","created_at":"2018-11-26T22:00:55Z","updated_at":"2018-11-26T22:10:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e04b3a3011b940ca3267a75d05a4b6b7da36ff0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37/commits","review_comments_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37/comments","review_comment_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/issues/37/comments","statuses_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/statuses/e2f529650359c4e697b202f72f030c07a4da47ca","head":{"label":"TheSriram:runtime_error_msg","ref":"runtime_error_msg","sha":"e2f529650359c4e697b202f72f030c07a4da47ca","user":{"login":"TheSriram","id":3770774,"node_id":"MDQ6VXNlcjM3NzA3NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3770774?v=4","gravatar_id":"","url":"https://api.github.com/users/TheSriram","html_url":"https://github.com/TheSriram","followers_url":"https://api.github.com/users/TheSriram/followers","following_url":"https://api.github.com/users/TheSriram/following{/other_user}","gists_url":"https://api.github.com/users/TheSriram/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSriram/subscriptions","organizations_url":"https://api.github.com/users/TheSriram/orgs","repos_url":"https://api.github.com/users/TheSriram/repos","events_url":"https://api.github.com/users/TheSriram/events{/privacy}","received_events_url":"https://api.github.com/users/TheSriram/received_events","type":"User","site_admin":false},"repo":{"id":157593851,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc1OTM4NTE=","name":"aws-lambda-builders","full_name":"TheSriram/aws-lambda-builders","private":false,"owner":{"login":"TheSriram","id":3770774,"node_id":"MDQ6VXNlcjM3NzA3NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3770774?v=4","gravatar_id":"","url":"https://api.github.com/users/TheSriram","html_url":"https://github.com/TheSriram","followers_url":"https://api.github.com/users/TheSriram/followers","following_url":"https://api.github.com/users/TheSriram/following{/other_user}","gists_url":"https://api.github.com/users/TheSriram/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSriram/subscriptions","organizations_url":"https://api.github.com/users/TheSriram/orgs","repos_url":"https://api.github.com/users/TheSriram/repos","events_url":"https://api.github.com/users/TheSriram/events{/privacy}","received_events_url":"https://api.github.com/users/TheSriram/received_events","type":"User","site_admin":false},"html_url":"https://github.com/TheSriram/aws-lambda-builders","description":"Python library to compile, build & package AWS Lambda functions for several runtimes & framework","fork":true,"url":"https://api.github.com/repos/TheSriram/aws-lambda-builders","forks_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/forks","keys_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/teams","hooks_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/hooks","issue_events_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/issues/events{/number}","events_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/events","assignees_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/assignees{/user}","branches_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/branches{/branch}","tags_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/tags","blobs_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/statuses/{sha}","languages_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/languages","stargazers_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/stargazers","contributors_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/contributors","subscribers_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/subscribers","subscription_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/subscription","commits_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/contents/{+path}","compare_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/merges","archive_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/downloads","issues_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/issues{/number}","pulls_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/pulls{/number}","milestones_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/milestones{/number}","notifications_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/labels{/name}","releases_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/releases{/id}","deployments_url":"https://api.github.com/repos/TheSriram/aws-lambda-builders/deployments","created_at":"2018-11-14T18:37:42Z","updated_at":"2018-11-20T21:22:57Z","pushed_at":"2018-11-26T21:54:33Z","git_url":"git://github.com/TheSriram/aws-lambda-builders.git","ssh_url":"git@github.com:TheSriram/aws-lambda-builders.git","clone_url":"https://github.com/TheSriram/aws-lambda-builders.git","svn_url":"https://github.com/TheSriram/aws-lambda-builders","homepage":"","size":114,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"awslabs:develop","ref":"develop","sha":"52f2a22f4cf3a7426ccf91f1139617097805a09d","user":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":156287142,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyODcxNDI=","name":"aws-lambda-builders","full_name":"awslabs/aws-lambda-builders","private":false,"owner":{"login":"awslabs","id":3299148,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyOTkxNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3299148?v=4","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/awslabs/aws-lambda-builders","description":"Python library to compile, build & package AWS Lambda functions for several runtimes & framework","fork":false,"url":"https://api.github.com/repos/awslabs/aws-lambda-builders","forks_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/forks","keys_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/teams","hooks_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/hooks","issue_events_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/events","assignees_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/tags","blobs_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/languages","stargazers_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/stargazers","contributors_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/contributors","subscribers_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/subscribers","subscription_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/subscription","commits_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/merges","archive_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/downloads","issues_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/releases{/id}","deployments_url":"https://api.github.com/repos/awslabs/aws-lambda-builders/deployments","created_at":"2018-11-05T21:42:39Z","updated_at":"2018-11-25T23:18:13Z","pushed_at":"2018-11-26T22:00:56Z","git_url":"git://github.com/awslabs/aws-lambda-builders.git","ssh_url":"git@github.com:awslabs/aws-lambda-builders.git","clone_url":"https://github.com/awslabs/aws-lambda-builders.git","svn_url":"https://github.com/awslabs/aws-lambda-builders","homepage":"","size":112,"stargazers_count":10,"watchers_count":10,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":8,"open_issues":9,"watchers":10,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37"},"html":{"href":"https://github.com/awslabs/aws-lambda-builders/pull/37"},"issue":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/issues/37"},"comments":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/awslabs/aws-lambda-builders/statuses/e2f529650359c4e697b202f72f030c07a4da47ca"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sanathkr"}}