img_data=open('assets\pblogo.png','rb').read()
img_title=MIMEImage(img_data,'png')
img_title.add_header('Content-Id','<pblogo>')
img_title["Content-Disposition"]="inline"
img_data=open('data\report.jpg','rb').read()
img_report=MIMEImage(img_data,'jpeg')
img_report.add_header('Content-Id','<reportimg>')
img_report["Content-Disposition"]="inline"
I am using IDLE on win7, and the first png captured well
as to the second:
img_data=open('data\report.jpg','rb').read()
IOError: [Errno 22] invalid mode ('rb') or filename: 'data\report.jpg'
why can't I open the second pic in the same way?