Instance

karthikbalaguru karthikbalaguru79 at gmail.com
Tue Jul 22 11:06:14 CEST 2008


On Jul 17, 5:34 pm, "Calvin Spealman" <ironfro... at gmail.com> wrote:
> On Thu, Jul 17, 2008 at 2:56 AM, karthikbalaguru
>
> <karthikbalagur... at gmail.com> wrote:
> > Hi,
>
> > I am new to python. I am trying to use the python files given to me
> > for bringing up a setup.
> > I get the following error while trying to use a python file -
> > AttributeError : Classroom instance has no attribute 'desk_offset'
>
> > How to resolve this ?
> > Should i need to define desk_offset to zero in the python file ?
>
> > Any ideas ..
>
> This means you did something like this:
>
> class Foo:
>    def __init__(self):
>        self.bar = 10
>
> f = Foo()
> print f.quu
> ...
> AttributeError : Foo instance has no attribute 'quu'
>
> See? You tried to use an attribute that simply doesn't exist. Look in
> the traceback for where you used the desk_offset attribute, and figure
> out why you thought the object had such an attribute and why it does
> not.
>

Thx!! Your ideas were useful.
I read some basic lessons on python and that were also very helpful in
solving
the problem.

Thx ,
Karthik Balaguru



More information about the Python-list mailing list