IOError and Try Again to loop the loop.

2010-07-11 Thread The Danny Bos
Heya, I'm running a py script that simply grabs an image, creates a thumbnail and uploads it to s3. I'm simply logging into ssh and running the script through Terminal. It works fine, but gives me an IOError every now and then. I was wondering if I can catch this error and just get the script to

Re: IOError and Try Again to loop the loop.

2010-07-11 Thread Chris Rebert
On Sun, Jul 11, 2010 at 7:15 PM, The Danny Bos danny...@gmail.com wrote: Heya, I'm running a py script that simply grabs an image, creates a thumbnail and uploads it to s3. I'm simply logging into ssh and running the script through Terminal. It works fine, but gives me an IOError every now

Re: IOError and Try Again to loop the loop.

2010-07-11 Thread MRAB
The Danny Bos wrote: Heya, I'm running a py script that simply grabs an image, creates a thumbnail and uploads it to s3. I'm simply logging into ssh and running the script through Terminal. It works fine, but gives me an IOError every now and then. I was wondering if I can catch this error and

Re: IOError and Try Again to loop the loop.

2010-07-11 Thread Alex Hall
It seems like seeing the code, or at least the bit in question, would be easier, but what about: for img in range(0, len(imagesToUpload:)) try: #do the thumbnail / upload thing on images[i] exceptIOError: i=0 This will duplicate a lot of the images already processed, but you said you are

Re: IOError and Try Again to loop the loop.

2010-07-11 Thread The Danny Bos
Thanks gang, I'm gonna paste what I've put together, doesn't seem right. Am I way off? Here's my code. - It goes through a table Item - Matches that Item ID to an API call - Grabs the data, saves it and creates the thumbnail - It dies due to Timeouts and Other baloney, all silly, nothing code

Re: IOError and Try Again to loop the loop.

2010-07-11 Thread Chris Rebert
On Sun, Jul 11, 2010 at 8:13 PM, The Danny Bos danny...@gmail.com wrote: Thanks gang, I'm gonna paste what I've put together, doesn't seem right. Am I way off? Here's my code.  - It goes through a table Item  - Matches that Item ID to an API call  - Grabs the data, saves it and creates the

Re: IOError and Try Again to loop the loop.

2010-07-11 Thread The Danny Bos
Thanks Chris, Agreed some of the code is a lot useless, I need to go through that stuff. So something like this (apologies for asking for some details, I'm not good at catching): items = Item.objects.all().filter(cover='').order_by('-reference_id') for item in items: url =

Re: IOError and Try Again to loop the loop.

2010-07-11 Thread Chris Rebert
On Jul 12, 2:14 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Jul 11, 2010 at 8:13 PM, The Danny Bos danny...@gmail.com wrote: Thanks gang, I'm gonna paste what I've put together, doesn't seem right. Am I way off? Here's my code.  - It goes through a table Item  - Matches that