[Zope3-Users] zope.interface.exceptions.InvalidInterface: Concrete attribute, existence
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=0sc=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* ** signature.asc Description: This is a digitally signed message part ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zope.interface.exceptions.InvalidInterface: Concrete attribute, existence
On Thu, Jul 3, 2008 at 1:34 PM, Tim Cook [EMAIL PROTECTED] wrote: 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. It looks like the immediate problem is that oship.openehr.rm.support.interval.Interval is not a field. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zope.interface.exceptions.InvalidInterface: Concrete attribute, existence
On Thu, 2008-07-03 at 14:08 -0400, Benji York wrote: On Thu, Jul 3, 2008 at 1:34 PM, Tim Cook [EMAIL PROTECTED] wrote: 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. It looks like the immediate problem is that oship.openehr.rm.support.interval.Interval is not a field. Thanks! That fixed that error. But I have NO IDEA how you arrived at that observation. Can you enlighten me? Cheers, Tim -- 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* ** signature.asc Description: This is a digitally signed message part ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zope.interface.exceptions.InvalidInterface: Concrete attribute, existence
On Thu, Jul 3, 2008 at 2:21 PM, Tim Cook [EMAIL PROTECTED] wrote: On Thu, 2008-07-03 at 14:08 -0400, Benji York wrote: On Thu, Jul 3, 2008 at 1:34 PM, Tim Cook [EMAIL PROTECTED] wrote: 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. It looks like the immediate problem is that oship.openehr.rm.support.interval.Interval is not a field. Thanks! That fixed that error. But I have NO IDEA how you arrived at that observation. Can you enlighten me? The last bit of user code in the traceback is attempting to define ICAttribute, I looked at it, noticed it had three attributes, one of which was referred to in the traceback (existence). The only bit of user code there was Interval, so I looked at it's definition and noticed that it didn't inherit from anything or provide any interfaces. Is there any way in which I might enlighten you further? :) -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zope.interface.exceptions.InvalidInterface: Concrete attribute, existence
On Thu, 2008-07-03 at 14:37 -0400, Benji York wrote: The last bit of user code in the traceback is attempting to define ICAttribute, I looked at it, noticed it had three attributes, one of which was referred to in the traceback (existence). The only bit of user code there was Interval, so I looked at it's definition and noticed that it didn't inherit from anything or provide any interfaces. Is there any way in which I might enlighten you further? :) Nope! You did a great job! I wasn't observant enough to catch that 'existence' was an attribute name. DUH! Thanks Again, Tim -- 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* ** signature.asc Description: This is a digitally signed message part ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users