{"action":"created","comment":{"url":"https://api.github.com/repos/ros/ros_comm/pulls/comments/35246082","id":35246082,"diff_hunk":"@@ -62,7 +62,11 @@\n \n import roslib.names # still needed for roslib.names.canonicalize_name()\n import rospy\n-import roslz4\n+try:\n+    import roslz4\n+    found_lz4 = True\n+except ImportError:\n+    found_lz4 = False","path":"tools/rosbag/src/rosbag/bag.py","position":9,"original_position":9,"commit_id":"5b3752ba8e33c25abe0ace132ef4665e60454a51","original_commit_id":"5b3752ba8e33c25abe0ace132ef4665e60454a51","user":{"login":"wjwwood","id":100427,"avatar_url":"https://avatars.githubusercontent.com/u/100427?v=3","gravatar_id":"","url":"https://api.github.com/users/wjwwood","html_url":"https://github.com/wjwwood","followers_url":"https://api.github.com/users/wjwwood/followers","following_url":"https://api.github.com/users/wjwwood/following{/other_user}","gists_url":"https://api.github.com/users/wjwwood/gists{/gist_id}","starred_url":"https://api.github.com/users/wjwwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjwwood/subscriptions","organizations_url":"https://api.github.com/users/wjwwood/orgs","repos_url":"https://api.github.com/users/wjwwood/repos","events_url":"https://api.github.com/users/wjwwood/events{/privacy}","received_events_url":"https://api.github.com/users/wjwwood/received_events","type":"User","site_admin":false},"body":"I would at least do a rospy.logdebug message to mention that the roslz4 import failed. The only time it's ok for this to happen is in the very narrow use case you have. Otherwise it is an exception and one that has occurred before (when lz4 was built for a different version of Python than what's currently installed, e.g. 2.7.9 versus 2.7.10). I'd even argue for a warning or info message, but at the very least there should be some message about it. Examples of issues found because lz4 is not importable:\r\n\r\nhttp://answers.ros.org/question/213728/issues-with-lz4/\r\nhttp://answers.ros.org/question/197278/importerror-no-module-named-_roslz4-after-installing-from-source/\r\n\r\nGranted they may have not been trying to use lz4, but they would have never known their systems were at fault unless this produced an error.","created_at":"2015-07-22T18:24:43Z","updated_at":"2015-07-22T18:24:43Z","html_url":"https://github.com/ros/ros_comm/pull/642#discussion_r35246082","pull_request_url":"https://api.github.com/repos/ros/ros_comm/pulls/642","_links":{"self":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/comments/35246082"},"html":{"href":"https://github.com/ros/ros_comm/pull/642#discussion_r35246082"},"pull_request":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/642"}}},"pull_request":{"url":"https://api.github.com/repos/ros/ros_comm/pulls/642","id":40593406,"html_url":"https://github.com/ros/ros_comm/pull/642","diff_url":"https://github.com/ros/ros_comm/pull/642.diff","patch_url":"https://github.com/ros/ros_comm/pull/642.patch","issue_url":"https://api.github.com/repos/ros/ros_comm/issues/642","number":642,"state":"open","locked":false,"title":"make support for lz4 in rosbag optional","user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"body":"When `roslz4` can't be imported (e.g. when using the rosbag API with a different Python version) the patch makes rosbag gracefully fall back to work except without support for lz4.","created_at":"2015-07-22T18:00:53Z","updated_at":"2015-07-22T18:24:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"949940cdb9a29f766ac4f9dd97ae33d0cafa859a","assignee":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ros/ros_comm/pulls/642/commits","review_comments_url":"https://api.github.com/repos/ros/ros_comm/pulls/642/comments","review_comment_url":"https://api.github.com/repos/ros/ros_comm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ros/ros_comm/issues/642/comments","statuses_url":"https://api.github.com/repos/ros/ros_comm/statuses/5b3752ba8e33c25abe0ace132ef4665e60454a51","head":{"label":"ros:rosbag_lz4_optional","ref":"rosbag_lz4_optional","sha":"5b3752ba8e33c25abe0ace132ef4665e60454a51","user":{"login":"ros","id":547448,"avatar_url":"https://avatars.githubusercontent.com/u/547448?v=3","gravatar_id":"","url":"https://api.github.com/users/ros","html_url":"https://github.com/ros","followers_url":"https://api.github.com/users/ros/followers","following_url":"https://api.github.com/users/ros/following{/other_user}","gists_url":"https://api.github.com/users/ros/gists{/gist_id}","starred_url":"https://api.github.com/users/ros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros/subscriptions","organizations_url":"https://api.github.com/users/ros/orgs","repos_url":"https://api.github.com/users/ros/repos","events_url":"https://api.github.com/users/ros/events{/privacy}","received_events_url":"https://api.github.com/users/ros/received_events","type":"Organization","site_admin":false},"repo":{"id":5474834,"name":"ros_comm","full_name":"ros/ros_comm","owner":{"login":"ros","id":547448,"avatar_url":"https://avatars.githubusercontent.com/u/547448?v=3","gravatar_id":"","url":"https://api.github.com/users/ros","html_url":"https://github.com/ros","followers_url":"https://api.github.com/users/ros/followers","following_url":"https://api.github.com/users/ros/following{/other_user}","gists_url":"https://api.github.com/users/ros/gists{/gist_id}","starred_url":"https://api.github.com/users/ros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros/subscriptions","organizations_url":"https://api.github.com/users/ros/orgs","repos_url":"https://api.github.com/users/ros/repos","events_url":"https://api.github.com/users/ros/events{/privacy}","received_events_url":"https://api.github.com/users/ros/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros/ros_comm","description":"ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).","fork":false,"url":"https://api.github.com/repos/ros/ros_comm","forks_url":"https://api.github.com/repos/ros/ros_comm/forks","keys_url":"https://api.github.com/repos/ros/ros_comm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros/ros_comm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros/ros_comm/teams","hooks_url":"https://api.github.com/repos/ros/ros_comm/hooks","issue_events_url":"https://api.github.com/repos/ros/ros_comm/issues/events{/number}","events_url":"https://api.github.com/repos/ros/ros_comm/events","assignees_url":"https://api.github.com/repos/ros/ros_comm/assignees{/user}","branches_url":"https://api.github.com/repos/ros/ros_comm/branches{/branch}","tags_url":"https://api.github.com/repos/ros/ros_comm/tags","blobs_url":"https://api.github.com/repos/ros/ros_comm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros/ros_comm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros/ros_comm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros/ros_comm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros/ros_comm/statuses/{sha}","languages_url":"https://api.github.com/repos/ros/ros_comm/languages","stargazers_url":"https://api.github.com/repos/ros/ros_comm/stargazers","contributors_url":"https://api.github.com/repos/ros/ros_comm/contributors","subscribers_url":"https://api.github.com/repos/ros/ros_comm/subscribers","subscription_url":"https://api.github.com/repos/ros/ros_comm/subscription","commits_url":"https://api.github.com/repos/ros/ros_comm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros/ros_comm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros/ros_comm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros/ros_comm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros/ros_comm/contents/{+path}","compare_url":"https://api.github.com/repos/ros/ros_comm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros/ros_comm/merges","archive_url":"https://api.github.com/repos/ros/ros_comm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros/ros_comm/downloads","issues_url":"https://api.github.com/repos/ros/ros_comm/issues{/number}","pulls_url":"https://api.github.com/repos/ros/ros_comm/pulls{/number}","milestones_url":"https://api.github.com/repos/ros/ros_comm/milestones{/number}","notifications_url":"https://api.github.com/repos/ros/ros_comm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros/ros_comm/labels{/name}","releases_url":"https://api.github.com/repos/ros/ros_comm/releases{/id}","created_at":"2012-08-19T22:26:34Z","updated_at":"2015-06-28T13:57:18Z","pushed_at":"2015-07-22T18:00:53Z","git_url":"git://github.com/ros/ros_comm.git","ssh_url":"git@github.com:ros/ros_comm.git","clone_url":"https://github.com/ros/ros_comm.git","svn_url":"https://github.com/ros/ros_comm","homepage":"http://wiki.ros.org/ros_comm","size":29611,"stargazers_count":56,"watchers_count":56,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":162,"mirror_url":null,"open_issues_count":151,"forks":162,"open_issues":151,"watchers":56,"default_branch":"indigo-devel"}},"base":{"label":"ros:indigo-devel","ref":"indigo-devel","sha":"4fadf3188313d5fc1aade7fd071710d6ac2dd675","user":{"login":"ros","id":547448,"avatar_url":"https://avatars.githubusercontent.com/u/547448?v=3","gravatar_id":"","url":"https://api.github.com/users/ros","html_url":"https://github.com/ros","followers_url":"https://api.github.com/users/ros/followers","following_url":"https://api.github.com/users/ros/following{/other_user}","gists_url":"https://api.github.com/users/ros/gists{/gist_id}","starred_url":"https://api.github.com/users/ros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros/subscriptions","organizations_url":"https://api.github.com/users/ros/orgs","repos_url":"https://api.github.com/users/ros/repos","events_url":"https://api.github.com/users/ros/events{/privacy}","received_events_url":"https://api.github.com/users/ros/received_events","type":"Organization","site_admin":false},"repo":{"id":5474834,"name":"ros_comm","full_name":"ros/ros_comm","owner":{"login":"ros","id":547448,"avatar_url":"https://avatars.githubusercontent.com/u/547448?v=3","gravatar_id":"","url":"https://api.github.com/users/ros","html_url":"https://github.com/ros","followers_url":"https://api.github.com/users/ros/followers","following_url":"https://api.github.com/users/ros/following{/other_user}","gists_url":"https://api.github.com/users/ros/gists{/gist_id}","starred_url":"https://api.github.com/users/ros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros/subscriptions","organizations_url":"https://api.github.com/users/ros/orgs","repos_url":"https://api.github.com/users/ros/repos","events_url":"https://api.github.com/users/ros/events{/privacy}","received_events_url":"https://api.github.com/users/ros/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros/ros_comm","description":"ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).","fork":false,"url":"https://api.github.com/repos/ros/ros_comm","forks_url":"https://api.github.com/repos/ros/ros_comm/forks","keys_url":"https://api.github.com/repos/ros/ros_comm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros/ros_comm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros/ros_comm/teams","hooks_url":"https://api.github.com/repos/ros/ros_comm/hooks","issue_events_url":"https://api.github.com/repos/ros/ros_comm/issues/events{/number}","events_url":"https://api.github.com/repos/ros/ros_comm/events","assignees_url":"https://api.github.com/repos/ros/ros_comm/assignees{/user}","branches_url":"https://api.github.com/repos/ros/ros_comm/branches{/branch}","tags_url":"https://api.github.com/repos/ros/ros_comm/tags","blobs_url":"https://api.github.com/repos/ros/ros_comm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros/ros_comm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros/ros_comm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros/ros_comm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros/ros_comm/statuses/{sha}","languages_url":"https://api.github.com/repos/ros/ros_comm/languages","stargazers_url":"https://api.github.com/repos/ros/ros_comm/stargazers","contributors_url":"https://api.github.com/repos/ros/ros_comm/contributors","subscribers_url":"https://api.github.com/repos/ros/ros_comm/subscribers","subscription_url":"https://api.github.com/repos/ros/ros_comm/subscription","commits_url":"https://api.github.com/repos/ros/ros_comm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros/ros_comm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros/ros_comm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros/ros_comm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ros/ros_comm/contents/{+path}","compare_url":"https://api.github.com/repos/ros/ros_comm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros/ros_comm/merges","archive_url":"https://api.github.com/repos/ros/ros_comm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros/ros_comm/downloads","issues_url":"https://api.github.com/repos/ros/ros_comm/issues{/number}","pulls_url":"https://api.github.com/repos/ros/ros_comm/pulls{/number}","milestones_url":"https://api.github.com/repos/ros/ros_comm/milestones{/number}","notifications_url":"https://api.github.com/repos/ros/ros_comm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros/ros_comm/labels{/name}","releases_url":"https://api.github.com/repos/ros/ros_comm/releases{/id}","created_at":"2012-08-19T22:26:34Z","updated_at":"2015-06-28T13:57:18Z","pushed_at":"2015-07-22T18:00:53Z","git_url":"git://github.com/ros/ros_comm.git","ssh_url":"git@github.com:ros/ros_comm.git","clone_url":"https://github.com/ros/ros_comm.git","svn_url":"https://github.com/ros/ros_comm","homepage":"http://wiki.ros.org/ros_comm","size":29611,"stargazers_count":56,"watchers_count":56,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":162,"mirror_url":null,"open_issues_count":151,"forks":162,"open_issues":151,"watchers":56,"default_branch":"indigo-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/642"},"html":{"href":"https://github.com/ros/ros_comm/pull/642"},"issue":{"href":"https://api.github.com/repos/ros/ros_comm/issues/642"},"comments":{"href":"https://api.github.com/repos/ros/ros_comm/issues/642/comments"},"review_comments":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/642/comments"},"review_comment":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ros/ros_comm/pulls/642/commits"},"statuses":{"href":"https://api.github.com/repos/ros/ros_comm/statuses/5b3752ba8e33c25abe0ace132ef4665e60454a51"}}}}