Re: exception due to NoneType
by Bruno Desthuilliers other posts by this author
Nov 7 2009 10:35AM messages near this date
exception due to NoneType
|
Re: exception due to NoneType
asit a écrit :
> In my program I want to catch exception which is caused by accessing
> NoneType object.
>
> Can anyone suggest me how this can be done ??
Not without the minimal working code exposing your problem, or the full
traceback you got. Merely "accessing NoneType object" doesn't by itself
raise any exception... I suspect you get the None object where you
expected something else and try to access an attribute of this
'something else', and ends up getting an AttributeError, but there are
other possible scenarii that might fit your (very poor) description of
the problem, so no way too help you without more informations. As a
general rule, remember that the traceback is actually meant to *help*
finding out what went wring.
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Asit
Bruno Desthuilliers
Ben Finney
Asit
Bruno Desthuilliers
Diez B. Roggisch
|