[Zope] AttributeError: RESPONSE ?!

Pascal Peregrina Pperegrina at Lastminute.com
Thu Feb 10 07:58:41 EST 2005


I don't recommend using 2.4
Python 2.4 is not a supported version for Zope 2.7.4.

Pascal

-----Message d'origine-----
De : zope-bounces at zope.org [mailto:zope-bounces at zope.org]De la part de
Peter Sabaini
Envoyé : jeudi 10 février 2005 13:28
À : zope at zope.org
Objet : Re: [Zope] AttributeError: RESPONSE ?!


On Thursday 10 February 2005 13:01, Pascal Peregrina wrote:
> I can't see what could be wrong there , specially if the issue appears
> randomly... :(

right.

> I just noticed that you are using python 2.3.5
> Something strange is that your issue looks like one of the bugs that
should
> precisely be fixed in that new version :
> Bug #1055820 Cyclic garbage collection was not protecting against that
> calling a live weakref to a piece of cyclic trash could resurrect an
insane
> mutation of the trash if any Python code ran during gc (via running a dead
> object's __del__ method, running another callback on a weakref to a dead
> object, or via any Python code run in any other thread that managed to
> obtain the GIL while a __del__ or callback was running in the thread doing
> gc). The most likely symptom was "impossible" AttributeEror exceptions,
> appearing seemingly at random, on weakly referenced objects. The cure was
> to clear all weakrefs to unreachable objects before allowing any callbacks
> to run.

yes, i stumbled upon this too. 

> I would suggest that you have a try on python 2.3.4

i'm compiling python 2.4 right now and will have a try with this; another 
option would be to try a self-compiled 2.3.5 version (i've been using the
one 
packaged with debian sid till now)

 - peter.

> But someone else may have better ideas...
>
> Pascal
>
> -----Message d'origine-----
> De : zope-bounces at zope.org [mailto:zope-bounces at zope.org]De la part de
> Peter Sabaini
> Envoyé : jeudi 10 février 2005 12:34
> À : zope at zope.org
> Objet : Re: [Zope] AttributeError: RESPONSE ?!
>
> On Thursday 10 February 2005 12:13, Pascal Peregrina wrote:
> > Can we see what is at line 10 of your <PythonScript at
> > /siopen_r_net/util/pageInit> ?
>
> sure, its fairly harmless:
>
>
>  ... comments ...
> 07 req = context.REQUEST
> 08
> 09 # turn off caching
> 10 resp = req.RESPONSE
> 11 resp.setHeader('Expires', 'Thu, 01 Dec 1994 16:00:00 GMT')
>
>
>  - peter.
>
> > Pascal
> >
> > -----Message d'origine-----
> > De : zope-bounces at zope.org [mailto:zope-bounces at zope.org]De la part de
> > Peter Sabaini
> > Envoyé : jeudi 10 février 2005 12:06
> > À : zope at zope.org
> > Objet : [Zope] AttributeError: RESPONSE ?!
> >
> >
> > hi list,
> >
> > this one has got me stumped; from the traceback:
> >
> > """
> > Module ZPublisher.HTTPRequest, line 1220, in __getattr__
> >
> > AttributeError: RESPONSE
> > """
> >
> > AFAIK the REQUEST object should *always* have a RESPONSE attribute,
> > right?
> >
> > background:
> >
> > * this happens under moderate load in our somewhat involved data entry
> > application
> >
> > * load generated by apache benchmark at a concurrency level of 1-2 plus
> > manual
> > browsing
> >
> > * occurs at random, one out of 5 clicks maybe
> >
> > * ZEO setup, zope 2.7.4, Python 2.3.5 (#2, Feb  9 2005, 00:38:15) [GCC
> > 3.3.5
> >
> > (Debian 1:3.3.5-8)] on linux2
> >
> >
> > under similar conditions i sometimes also get an "AttributeError:
> > SESSION" which looks like somehow REQUEST is loosing its attributes? can
> > that happen?
> >
> >
> > *any* thoughts greatly appreciated before i have to break out gdb and
> > immerse
> > myself for days in it :-/
> >
> >  - peter.
> >
> >
> >
> > ps.: somewhat abbreviated traceback below
> >
> >
> > Traceback (innermost last):
> >   Module ZPublisher.Publish, line 101, in publish
> >   Module ZPublisher.mapply, line 88, in mapply
> >   Module ZPublisher.Publish, line 39, in call_object
> >   Module Products.FormProcessor.FormProcessor, line 155, in displayForm
> >   Module Products.FormProcessor.FormProcessor, line 180, in view
> >   Module Products.FormProcessor.FormController, line 274, in view
> >   Module Products.FormProcessor.Presenter, line 1033, in render
> >   Module Products.FormProcessor.Presenter, line 413, in render
> >   Module Shared.DC.Scripts.Bindings, line 306, in __call__
> >   Module Products.UnrestrictedPageTemplateFiles.PageTemplateFile, line
> > 32, in
> > _bindAndExec
> >   Module Products.PageTemplates.PageTemplateFile, line 106, in _exec
> >   Module Products.PageTemplates.PageTemplate, line 96, in pt_render
> >    - <PageTemplateFile
> > at
>
>
/siopen_r_net/service_htmlpresenter/hrs_conclusion_of_treatment_conclusion_
>
> >o f_treatment
> > used for /siopen_r_net/site/members/studies/HRNBL1/patients/PatDetail>
> >   Module TAL.TALInterpreter, line 190, in __call__
> >   Module TAL.TALInterpreter, line 234, in interpret
> >   Module TAL.TALInterpreter, line 409, in do_optTag_tal
> >   Module TAL.TALInterpreter, line 394, in do_optTag
> >   Module TAL.TALInterpreter, line 389, in no_tag
> >   Module TAL.TALInterpreter, line 234, in interpret
> >   Module TAL.TALInterpreter, line 671, in do_useMacro
> >   Module TAL.TALInterpreter, line 234, in interpret
> >   Module TAL.TALInterpreter, line 484, in do_insertText_tal
> >   Module Products.PageTemplates.TALES, line 227, in evaluateText
> >   Module Products.PageTemplates.TALES, line 221, in evaluate
> >    - URL: /siopen_r_net/standard_template.pt
> >    - Line 5, Column 0
> >    - Expression: standard:'here/util/pageInit'
> >    - Names:
> >       {'container': <ConfigurableFormView instance at ab841740>,
> >        'context': <Folder instance at ac91c440>,
> >        'default': <Products.PageTemplates.TALES.Default instance at
> > 0xb72263cc>,
> >        'here': <Folder instance at ac91c440>,
> >        'loop': <SafeMapping instance at ab8417e0>,
> >        'modules':
> > <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
> >
> > instance at 0xb722628c>,
> >        'nothing': None,
> >        'options': {'args': (),
> >                    'pagemacro': [('version', '1.5'),
> >                                  ('mode', 'html'),
> >                                  ('setSourceFile',
> >                                   '/siopen_r_net/standard_template.pt'),
> >                                  ('startTag',
> >                                   ('html',
> >
> >   -- snip --
> >
> >                                  ('endScope', ()),
> >                                  ('rawtextColumn',
> >                                   ('\n\n
> > </div>\n\n</div>\n\n\n\n</body>\n</html>',
> >                                    7))]},
> >        'repeat': <SafeMapping instance at ab8417e0>,
> >        'request': <HTTPRequest,
>
>
URL=http://srn-elendil.telbiomed.at/members/studies/HRNBL1/patients/PatDeta
>
> >i l/conclusion_of_treatment/service_formprocessor/displayForm>,
> >        'root': <Application instance at b5194d40>,
> >        'template': <PageTemplateFile
> > at
>
>
/siopen_r_net/service_htmlpresenter/hrs_conclusion_of_treatment_conclusion_
>
> >o f_treatment
> > used for /siopen_r_net/site/members/studies/HRNBL1/patients/PatDetail>,
> >        'traverse_subpath': [],
> >        'user': p.sabaini}
> >   Module Products.PageTemplates.Expressions, line 201, in __call__
> >   Module Products.PageTemplates.Expressions, line 196, in _eval
> >   Module Products.PageTemplates.Expressions, line 95, in render
> >   Module Products.PageTemplates.ZRPythonExpr, line 73, in call_with_ns
> >   Module Shared.DC.Scripts.Bindings, line 320, in
>
> __render_with_namespace__
>
> >   Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
> >   Module Products.PythonScripts.PythonScript, line 323, in _exec
> >   Module None, line 10, in pageInit
> >    - <PythonScript at /siopen_r_net/util/pageInit>
> >    - Line 10
> >   Module ZPublisher.HTTPRequest, line 1220, in __getattr__
> > AttributeError: RESPONSE
> > _______________________________________________
> > Zope maillist  -  Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >
> >
> > **********************************************************************
> > This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom they
> > are addressed. If you have received this email in error please notify
> > the system manager.
> >
> > This footnote also confirms that this email message has been swept by
> > MIMEsweeper for the presence of computer viruses.
> >
> > www.mimesweeper.com
> > **********************************************************************
> >
> > _______________________________________________
> > Zope maillist  -  Zope at zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )

-- 

===========================================

  Peter Sabaini
  ARC Seibersdorf research GmbH
  Biomedical Engineering / eHealth systems

  Reininghausstrasse 13/1
  A-8020 Graz, Austria

  T: +43 (0)316 586570-55
  F: +43 (0)316 586570-54
  E: sabaini at telbiomed.at
  H: www.telbiomed.at
_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


More information about the Zope mailing list