[Zope3-Users] zope.interface.exceptions.InvalidInterface: Concrete attribute, existence

Tim Cook timothywayne.cook at gmail.com
Thu Jul 3 13:34:17 EDT 2008


Hi All,

[Zope3 on Linux, Python 2.4.4]

I've been chasing a problem for a couple of days and I just can't figure
out what the error is telling me.  Thanks for any pointers.

Google hasn't been much help as it mostly returns the source for the
error or one conversation from 2004 discussing implementing Interfaces.


The offending source code can be seen in this package:
http://www.openehr.org/wsvn/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/?rev=0&sc=0

At first I thought this was a circular import problem but now I am
thinking that it may be a fundamental misunderstanding on my part in how
to use Interfaces.  I am currently inheriting an Interface from an
associated Interface and then also inheriting the associated classes the
same way.  The problem begins when I attempt to import 'Archetype' which
implements IArchetype. 

The full traceback is below but here is a synopsis:

IArchetype has an attribute 'definition' which is a CComplexObject type

CComplexObject implements ICComplexObject and inherits from
CDefinedObject

ICComplexObject inherits from ICDefinedObject

CComplexObject inherits from CDefinedObject and implements
ICComplexObject

CDefinedObject inherits from CObject

CObject has an attribute 'parent' which is a CAttribute type

CAttribute inherits from Field and implements ICAttribute

ICAttribute inherits from IField


Traceback (most recent call last):
  File "load_ar.py", line 183, in ?
    from atbldr.atbldr import CreateAT
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/atbldr/atbldr.py", line 49, in ?
    from openehr.am.archetype.archetype import Archetype
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/archetype.py", line 23, in ?
    from interfaces.archetype import IArchetype
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/interfaces/archetype.py", line 23, in ?
    from openehr.am.archetype.constraintmodel.ccomplexobject import
CComplexObject
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/constraintmodel/ccomplexobject.py", line 23, in ?
    from interfaces.ccomplexobject import ICComplexObject
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/constraintmodel/interfaces/ccomplexobject.py", line 23, in ?
    from cdefinedobject import ICDefinedObject
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/constraintmodel/interfaces/cdefinedobject.py", line 23, in ?
    from cobject import ICObject
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/constraintmodel/interfaces/cobject.py", line 25, in ?
    from openehr.am.archetype.constraintmodel.cattribute import
CAttribute
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/constraintmodel/cattribute.py", line 24, in ?
    from interfaces.cattribute import ICAttribute
  File
"/home/tim/projects/ref_impl_python/TRUNK/oship/src/oship/openehr/am/archetype/constraintmodel/interfaces/cattribute.py", line 28, in ?
    class ICAttribute(IField):
  File
"/home/tim/buildout-eggs/tmpJ-oHMS/zope.interface-3.4.1-py2.4-linux-x86_64.egg/zope/interface/interface.py", line 488, in __init__
zope.interface.exceptions.InvalidInterface: Concrete attribute,
existence



-- 
Timothy Cook, MSc
Health Informatics Research & Development Services
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == timothy.cook 
**************************************************************
*You may get my Public GPG key from  popular keyservers or   *
*from this link http://timothywayne.cook.googlepages.com/home*
**************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20080703/e14fa48c/attachment.bin


More information about the Zope3-users mailing list