Instance

Calvin Spealman ironfroggy at gmail.com
Thu Jul 17 08:34:13 EDT 2008


On Thu, Jul 17, 2008 at 2:56 AM, karthikbalaguru
<karthikbalaguru79 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.

-- 
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://ironfroggy-code.blogspot.com/



More information about the Python-list mailing list