Hi there,

in a plone site where Data is partially maintained in a mysql db, I get a
ConnectionStateError when I try to access properties on the sit.

the error is as follows:

Time    2010/04/25 15:10:28.998 GMT+2
User Name (User Id)     beat (beat)
Request URL
Exception Type  ConnectionStateError
Exception Value         Shouldn't load state for 0x1cbe82 when the connection 
is closed

Traceback (innermost last):

    * Module ZPublisher.Publish, line 119, in publish
    * Module ZPublisher.mapply, line 88, in mapply
    * Module ZPublisher.Publish, line 42, in call_object
    * Module <wrapper>, line 5, in wrapper
    * Module kss.core.actionwrapper, line 238, in apply
    * Module energiecluster.addresses.browser.company, line 465, in
    * Module energiecluster.addresses.Flag, line 400, in handleFlags
    * Module energiecluster.addresses.Flag, line 542, in delFlagsFromObject
    * Module energiecluster.addresses.Flag, line 572, in updateHooks
    * Module energiecluster.addresses.Newsletteremail, line 248, in hookupFlags
    * Module energiecluster.addresses.Newsletteremail, line 188, in 
    * Module energiecluster.addresses.Newsletteremail, line 216, in 
    * Module ZODB.Connection, line 758, in setstate

ConnectionStateError: Shouldn't load state for 0x1cbe82 when the connection is

the code that produces the error is the line
    if not ep.hasProperty('newsletter_hooked_flags'):

in a call of the following method:

def getHookedFlags(self):
    if not self.context:
    pt = self.context.portal_properties
    ep = getattr(pt.aq_inner.aq_self, 'energiecluster_properties', None)
    if not ep:
        ep = SimpleItemWithProperties(id='energiecluster_properties',
        pt._setObject('energiecluster_properties', ep)

    if not ep.hasProperty('newsletter_hooked_flags'): <--------- error here
        values = [
            '#where type 0 = html, type 1 = text',
            value=values, type='lines')
    return  ep.getProperty('newsletter_hooked_flags')

unfortunately this happens only on the life site. I can not reproduce the error
in our test environment.

I would very much appreciate a hint how to circumvent that error.
Zope-DB mailing list

Reply via email to