Re: [Tutor] Catching OLE error

2005-07-15 Thread Bernard Lebel
Thanks Danny. Bernard On 7/14/05, Danny Yoo <[EMAIL PROTECTED]> wrote: > > > > So the errors are getting raised before Python even knows there is a > > > problem, so it cannot catch them in an except block. From my very > > > limited expoerience of COM programming I'd guess that there is a typ

Re: [Tutor] Catching OLE error

2005-07-14 Thread Danny Yoo
> > So the errors are getting raised before Python even knows there is a > > problem, so it cannot catch them in an except block. From my very > > limited expoerience of COM programming I'd guess that there is a type > > mismatch somewhere either in the data you are passing in or in the > > data y

Re: [Tutor] Catching OLE error

2005-07-14 Thread Bernard Lebel
Thanks Alan, I'll check it out. Cheers Bernard On 7/14/05, Alan G <[EMAIL PROTECTED]> wrote: > > Isn't the OLEError alike the ValueError, KeyError and so on? > > If so shouldn't it go before the colon? > > The problem, as I understand it, is that OLEError is not coming > from Python but from

Re: [Tutor] Catching OLE error

2005-07-14 Thread Alan G
> Isn't the OLEError alike the ValueError, KeyError and so on? > If so shouldn't it go before the colon? The problem, as I understand it, is that OLEError is not coming from Python but from COM. So the errors are getting raised before Python even knows there is a problem, so it cannot catch th

Re: [Tutor] Catching OLE error

2005-07-14 Thread Alan G
> I just noticed you put OLEError before the colon you should have > except: OLEError print "ole" I doubt if that would work effectively. > if that doesn't work you could just get rid of the OLEError bit > and all errors will be ignored. And that is decidedly dangerous unless you are sure that

Re: [Tutor] Catching OLE error

2005-07-14 Thread Bernard Lebel
Isn't the OLEError alike the ValueError, KeyError and so on? If so shouldn't it go before the colon? Thanks Bernard On 7/14/05, Adam Bark <[EMAIL PROTECTED]> wrote: > I just noticed you put OLEError before the colon you should have > except: > OLEError > print "ole" > > if that do

Re: [Tutor] Catching OLE error

2005-07-14 Thread Adam Bark
I just noticed you put OLEError before the colon you should have except:     OLEError     print "ole" if that doesn't work you could just get rid of the OLEError bit and all errors will be ignored.On 7/14/05, Bernard Lebel < [EMAIL PROTECTED]> wrote:Very well.#INFO : < NewRenderShot > importAnimat

Re: [Tutor] Catching OLE error

2005-07-14 Thread Bernard Lebel
Very well. #INFO : < NewRenderShot > importAnimation> :: Import action for character ""... #ERROR : 2000 - Argument 0 (Source) is invalid #ERROR : 2001-ANIM-ApplyAction - Argument 0 is invalid - [line 3543 in D:\Software\Softimage\XSI_4.2\Application\DSScripts\action.vbs] #ERROR : 21000-ANIM-Impo

[Tutor] Catching OLE error

2005-07-14 Thread Adam Bark
Can you send me the output for an OLE error? The correct syntax should be included in the error message like this: Traceback (most recent call last):   File "", line 1, in ? TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' TypeError would be the exception so you would have: try

[Tutor] Catching OLE error

2005-07-14 Thread Bernard Lebel
Hello, A simple question: what is the syntax in a try/except for the OLE error? Let say you want to catch OLE error: try: print stuff except OLEError: print 'ole' Now the problem is that I just can't seem to find anything how the exact grammar of this error! I have looked in the Python document