[Zope] Re: NisUserFolder

Dieter Maurer dieter at handshake.de
Thu Aug 28 21:27:57 EDT 2003


garry saddington wrote at 2003-8-28 07:40 +0100:
 > ...
 > >Thanks, i have got the traceback but unfortunately i am not able to interpret 
 > it, can anyone help me please?
 
Wow! This traceback is so strange that not even I understand what
happens :-)

I explain a bit the relevant parts of the traceback, such
that you can interpret them better in the future:

 >   Module Products.CMFCore.FSPythonScript, line 124, in _exec
 >    - __traceback_info__: ({'script': <FSPythonScript at /test/logged_in>, 
 > 'context': <PloneSite instance at 8f99a20>, 'container': <PloneSite instance 
 > at 8f99a20>, 'traverse_subpath': []}, (), {}, None)

The first interesting piece (everything before was basic
framework):

Here "FSPythonScript" "test/logged_in" was called with
"context" and "container" both your Plone site.

 >   Module Script (Python), line 25, in logged_in

The problem happens in line 25 of this python script.

 > ....
 >   Module Products.CMFCore.FSPageTemplate, line 167, in _exec

It calls an "FSPageTemplate"...

 > ...
 >   Module Products.PageTemplates.PageTemplate, line 95, in pt_render
 >    - <FSPageTemplate at /test/login_success>

This is the "FSPageTemplate" "/test/login_success".

 > ...
 >   Module Products.PageTemplates.TALES, line 217, in evaluate
 >    - Line 35, Column 12

The problem happens in line 35...
 >    - Expression: <PythonExpr not(member.login_time == 
 > here.ZopeTime('2000/01/01') and here.validate_email)>

while evaluating "python: not(member.login_time == here.ZopeTime('2000/01/01')
and here.validate_email"...

 >    - Names:
 >       {'container': <PloneSite instance at 8f99a20>,
 >        'default': <Products.PageTemplates.TALES.Default instance at 
 > 0x86c10ac>,
 >        'here': <PloneSite instance at 8f99a20>,
 > ...
 >        'request': <HTTPRequest, URL=http://zope/test/logged_in>,

The request has been for "http://zope/test/logged_in".
 > ...
 >        'template': <FSPageTemplate at /test/login_success>,

This tells you again that we are in "FSPageTemplate at /test/login_success".
 > ...
 >        'user': try}

This tells you that the user "try" was successfully authenticated.

 >    - __traceback_info__: not(member.login_time == here.ZopeTime('2000/01/01') 
 > and here.validate_email)
 >   Module Python expression "not(member.login_time == 
 > here.ZopeTime('2000/01/01') and here.validate_email)", line 2, in f
 > AttributeError: ZopeTime

This tells you that an attribute lookup for "ZopeTime" failed in
the above Python expression. There is just one such occurrence
"here.ZopeTime".

I know that "ZopeTime" is a method of Zope's root object,
obtained via acquisition. When "here" is not able to acquire it,
then it means, the root is not in "here"s acquisition context.
This is *very* strange.

Check "/test/login_success" whether someone has redefined "here".
The redefinition might also be in some macro used by this template.

But, as it is not very likely that someone redefines "here",
you may also see some deep bug.


By the way: you seem to get different exceptions:

  'global name "time" is not defined' in your last message

and now

  'AttributeError "ZopeTime"'


When you see random non-deterministic errors, this may
indicate that some C level extension corrupts memory
(usually reuses objects which still are in use).
In this case, objects can suddenly change identity and
value and class. Almost everything is possible.

I saw such behaviour with Python 2.1.x with "x < 3".
Then, Python itself was the bad "C" level "extension".


Dieter



More information about the Zope mailing list