diff --git a/src/capture_image.py b/src/capture_image.py index c9d1267..041e93b 100755 --- a/src/capture_image.py +++ b/src/capture_image.py @@ -42,7 +42,7 @@ class CaptureImage: # Try to convert the ROS image message to a cv2 Image try: image = self.bridge.imgmsg_to_cv2(msg, 'bgr8') - except CvBridgeError, e: + except CvBridgeError as e: rospy.logwarn('CV Bridge error: {0}'.format(e)) # Define the file name diff --git a/src/edge_detection.py b/src/edge_detection.py index 79d794c..eb185f8 100755 --- a/src/edge_detection.py +++ b/src/edge_detection.py @@ -55,7 +55,7 @@ class EdgeDetection: # Try to convert the ROS image message to a CV2 Image try: image = self.bridge.imgmsg_to_cv2(msg, 'bgr8') - except CvBridgeError, e: + except CvBridgeError as e: rospy.logwarn('CV Bridge error: {0}'.format(e)) # Apply the Canny Edge filter function to the transformed CV2 Image