AttributeError? Why?

Giorgi Lekishvili gleki at gol.ge
Wed Jun 12 07:41:46 EDT 2002


Hi all!

I have been making a module, which, as I believed, was organized
correctly. It has __init__.py file, which is empty, and several modules.

Now, what happens: import goes fine. But when I try to create a class,
>>> s=SimAn.SimAn([],[],None,0,0)
Traceback (innermost last):
  File "<pyshell#18>", line 1, in ?
    s=SimAn.SimAn([],[],None,0,0)
  File "D:\Python20\SED\SimAn.py", line 18, in __init__
    self.Scenario=ARScenario.ARScenario(self.xdata)
AttributeError: ARScenario
=====
Of course, ARScenario is there:
>>> dir(SimAn)
['ARScenario', 'SimAn', '__builtins__', '__doc__', '__file__',
'__name__', 'copy', 'math']
=====
and, of course, the class ARScenario based on the class Scenario, has
__init__(self,..) method.


The question: where's my error?

Thank you.
Giorgi




More information about the Python-list mailing list