Re: Error on base64.b64decode() ?!

2007-10-14 Thread Tim Roberts
Christoph Krammer [EMAIL PROTECTED] wrote: On 12 Okt., 17:09, Jean-Paul Calderone [EMAIL PROTECTED] wrote: If you get an incorrect padding error, try appending a = and decoding again. If you get the error again, try appending one more =. If it still doesn't work, then you might be out of

Re: Error on base64.b64decode() ?!

2007-10-13 Thread Christoph Krammer
On 12 Okt., 17:09, Jean-Paul Calderone [EMAIL PROTECTED] wrote: If you get an incorrect padding error, try appending a = and decoding again. If you get the error again, try appending one more =. If it still doesn't work, then you might be out of luck. This seems to work in some cases, but

Re: Error on base64.b64decode() ?!

2007-10-12 Thread Jean-Paul Calderone
On Fri, 12 Oct 2007 14:59:13 -, Christoph Krammer [EMAIL PROTECTED] wrote: Hello everybody, I am using a python script to extract images from email messages. This works fine for some messages, but not all attached images can be decoded. I use the following code to decode the image and save it

Error on base64.b64decode() ?!

2007-10-12 Thread Christoph Krammer
Hello everybody, I am using a python script to extract images from email messages. This works fine for some messages, but not all attached images can be decoded. I use the following code to decode the image and save it to a database: try: imagedec = base64.b64decode(imageenc) imagehash =