Skip to content

Commit

Permalink
fix python3 decode error in smach_to_mail
Browse files Browse the repository at this point in the history
  • Loading branch information
knorth55 committed Mar 26, 2023
1 parent d8c1ada commit a173185
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jsk_robot_common/jsk_robot_startup/scripts/smach_to_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ def _send_mail(self, subject, state_list):
image = EmailBody()
image.type = 'img'
image.img_size = 100
image.img_data = x['IMAGE']
img_txt = x['IMAGE']
if isinstance(img_txt, bytes):
img_txt = img_txt.decode('utf-8')
image.img_data = img_txt
email_msg.body.append(image)
email_msg.body.append(changeline)
email_msg.body.append(changeline)
Expand Down

0 comments on commit a173185

Please sign in to comment.