AttributeError: LineLogic instance has no attribute 'probe'

John Gordon gordon at panix.com
Wed Jul 29 13:32:28 EDT 2015


In <mailman.1041.1438049757.3674.python-list at python.org> Cameron Simpson <cs at zip.com.au> writes:

> >Since you haven't posted the actual complete code, we can only guess
> >at the problem.
> >
> >My guess is that you have two different definitions of the LineLogic
> >class, one of them lacking the probe attribute.

> Alternatively, if the code he did quote is accurate, he may have not indented 
> the definition of __init__. Example:

>   class LineLogic(object):
>       ''' doc string
>       '''

>   def __init__(self):
>       ...

> This is legal, but wrong. It will result in LineLogic having the default 
> initialisation i.e. nothing, as the __init__ function is not part of the class.

Ooh, I like your guess better.  :-)


-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list