OK, I've upgraded my Zope to 2.6 and it looks like the same error is occurring... Problem redescription: I am trying to create a simple zclass for storing and presenting information about individuals. Within a product 'sgNiceStreams' is the zclass 'sgPerson_zclass'. sgPerson has a propertysheet 'contactInfo' and a python script 'getInfo'. The script has only one line: return(context.propertysheets.common.contactInfo.getProperty('email')) which generates the following error and traceback: *============== AttributeError* Traceback (innermost last): Module ZPublisher.Publish, line 98, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 252, in __call__ Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec Module Products.PythonScripts.PythonScript, line 315, in _exec Module Script (Python), line 1, in test - <PythonScript at /Control_Panel/Products/sgNiceStreams/sgPerson_zclass/propertysheets/methods/getInfo> - Line 1 Module OFS.PropertySheets, line 164, in getProperty Module ZClasses.Property, line 66, in v_self AttributeError: _zclass_ =============== For whatever reason, some propertysheet information is accessible. For example, when 'getProperty' is changed to 'propertyMap', a mapping is returned. code: return(context.propertysheets.common.contactInfo.propertyMap()) output: ({'id': 'fullName', 'type': 'string', 'meta': {}}, {'id': 'email', 'type': 'string', 'meta': {}}, {'id': 'telephone', 'type': 'string', 'meta': {}}) What is this mystery that I have spent much time on with little progress? Danny Morgan
Danny Morgan writes:
OK, I've upgraded my Zope to 2.6 and it looks like the same error is occurring...
Problem redescription: I am trying to create a simple zclass for storing and presenting information about individuals. Within a product 'sgNiceStreams' is the zclass 'sgPerson_zclass'. sgPerson has a propertysheet 'contactInfo' and a python script 'getInfo'.
The script has only one line:
return(context.propertysheets.common.contactInfo.getProperty('email')) Omit the "common.".
"common" is used inside the ZClass itself but not by the ZInstances. Dieter
participants (2)
-
Danny Morgan -
Dieter Maurer