No
Gaz
gaz082 at gmail.com
Tue Feb 21 10:08:10 EST 2006
Check this piece of code:
#now add an image part
part = writer.nextpart()
part.addheader('Content-Transfer-Encoding', 'base64')
body = part.startbody('image/jpeg')
base64.encode(open('c:\check.jpg', 'rb'), body)
I get the following error:
IOError: [Errno 2] No such file or directory: 'c:\\check.jpg'
args = (2, 'No such file or directory')
errno = 2
filename = r'c:\check.jpg'
strerror = 'No such file or directory'
Dont know why im getting such error, the file is there. Perhaps wrong
filetype? Wrong read mode?
More information about the Python-list
mailing list