From 0017bc82e6a1755bf46e328a8a33aa4783a4afa7 Mon Sep 17 00:00:00 2001 From: "Alan G. Sanchez" Date: Thu, 18 Aug 2022 11:23:17 -0700 Subject: [PATCH] Fixed syntax issue. --- src/capture_image.py | 2 +- src/edge_detection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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