[Zope] attribute-less object(assign or del)

Kate Legere klegere at kfpl.ca
Wed Jan 3 11:06:05 EST 2007


It turned out, actually to be easier than I though to correct this - I ended
up trapping the exception whenever one occurred. 

Thanks for all the input.

Katie



-----Original Message-----
From: Dieter Maurer [mailto:dieter at handshake.de] 
Sent: Sunday, December 17, 2006 4:25 AM
To: Kate Legere
Cc: zope at zope.org
Subject: RE: [Zope] attribute-less object(assign or del)

Kate Legere wrote at 2006-12-11 09:31 -0500:
>This is the full trackback:
>
>      				
>Site Error Log Site Error Log at  /error_log
>Exception traceback
>
>Time 	2006/12/11 09:26:04.451 US/Eastern
>User Name (User Id) 	klegere at kfpl.ca (klegere at kfpl.ca)
>Request URL
>http://staffnet.kfpl.ca:8080/kfplStaff/statsTracker/display/copy_of_stats_o
u
>tput_branch
>Exception Type 	TypeError
>Exception Value 	attribute-less object (assign or del)
> ....
>      <PythonScript at
>/kfplStaff/statsTracker/display/copy_of_stats_output_branch>
>      Line 45
>    * Module RestrictedPython.Guards, line 96, in handler
>
>TypeError: attribute-less object (assign or del)

This gives us another two potential problem causes.

  * It is likely that you cannot change 'Record' attributes
    in restricted code (such as in 'PythonScript').

    Try in trusted code (e.g. an "ExternalMethod").

  * Maybe, you try to change not a "Record" instance
    (a single hit) but the "Result" instance (representing
    the complete result list). "Result" instances do not have
    any writable attributes.



-- 
Dieter



More information about the Zope mailing list