[Zope-dev] User object properties

Yapo Sébastien sebastien.yapo@free.fr
Fri, 25 Aug 2000 10:46:45 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_004D_01C00E81.C3401220
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm trying to retrieve properties "nom" and "prenom"  from a tweaked =
User object using :

<dtml-with "REQUEST.AUTHENTICATED_USER"><dtml-with =
"getUser(id_resp_val)"><dtml-var nom><dtml-var =
prenom></dtml-with></dtml-with>
where "id_resp_val'" contains the user login name..

I get the following error ...

Error Type: AttributeError
Error Value: __hash__


Traceback (innermost last):
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 214, =
in publish_module
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 179, =
in publish
  File C:\Program Files\Zope\lib\python\Zope\__init__.py, line 202, in =
zpublisher_exception_hook
    (Object: CatalogAware)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 165, =
in publish
  File C:\Program Files\Zope\lib\python\ZPublisher\mapply.py, line 160, =
in mapply
    (Object: manage_editBonAchatForm)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 102, =
in call_object
    (Object: manage_editBonAchatForm)
  File C:\Program Files\Zope\lib\python\App\special_dtml.py, line 120, =
in __call__
    (Object: manage_editBonAchatForm)
    (Info: C:\Program =
Files\Zope\lib\python\Products\BonAchat/BonAchatEdit.dtml)
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_String.py, =
line 502, in __call__
    (Object: manage_editBonAchatForm)
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_With.py, =
line 148, in render
    (Object: REQUEST.AUTHENTICATED_USER)
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_With.py, =
line 133, in render
    (Object: getUser(id_resp_val))
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_Util.py, =
line 335, in eval
    (Object: getUser(id_resp_val))
    (Info: getUser)
  File <string>, line 0, in ?
  File C:\Program Files\Zope\lib\python\AccessControl\User.py, line 666, =
in getUser
    (Object: RoleManager)
  File C:\Program Files\Zope\lib\python\ZODB\PersistentMapping.py, line =
129, in get
AttributeError: (see above)

I must have made a mistake somewhere ....How can I do it ?
Thanks by advance
    SY



------=_NextPart_000_004D_01C00E81.C3401220
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial><FONT size=3D2>I'm trying to retrieve properties =
"nom" and=20
"prenom"  from a tweaked User object using :</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-with=20
"REQUEST.AUTHENTICATED_USER"&gt;&lt;dtml-with=20
"getUser(id_resp_val)"&gt;&lt;dtml-var nom&gt;&lt;dtml-var=20
prenom&gt;&lt;/dtml-with&gt;&lt;/dtml-with&gt;</FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2>where "id_resp_val'" contains the =
user login=20
name..</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I get the following error =
...</FONT></DIV>
<DIV><FONT face=3DArial><FONT =
size=3D2><STRONG></STRONG></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial><FONT size=3D2><STRONG>Error Type:=20
AttributeError</STRONG><BR><STRONG>Error Value:=20
__hash__</STRONG></DIV><BR></FONT><PRE>Traceback (innermost last):
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 214, =
in publish_module
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 179, =
in publish
  File C:\Program Files\Zope\lib\python\Zope\__init__.py, line 202, in =
zpublisher_exception_hook
    (Object: CatalogAware)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 165, =
in publish
  File C:\Program Files\Zope\lib\python\ZPublisher\mapply.py, line 160, =
in mapply
    (Object: manage_editBonAchatForm)
  File C:\Program Files\Zope\lib\python\ZPublisher\Publish.py, line 102, =
in call_object
    (Object: manage_editBonAchatForm)
  File C:\Program Files\Zope\lib\python\App\special_dtml.py, line 120, =
in __call__
    (Object: manage_editBonAchatForm)
    (Info: C:\Program =
Files\Zope\lib\python\Products\BonAchat/BonAchatEdit.dtml)
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_String.py, =
line 502, in __call__
    (Object: manage_editBonAchatForm)
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_With.py, =
line 148, in render
    (Object: REQUEST.AUTHENTICATED_USER)
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_With.py, =
line 133, in render
    (Object: getUser(id_resp_val))
  File C:\Program Files\Zope\lib\python\DocumentTemplate\DT_Util.py, =
line 335, in eval
    (Object: getUser(id_resp_val))
    (Info: getUser)
  File &lt;string&gt;, line 0, in ?
  File C:\Program Files\Zope\lib\python\AccessControl\User.py, line 666, =
in getUser
    (Object: RoleManager)
  File C:\Program Files\Zope\lib\python\ZODB\PersistentMapping.py, line =
129, in get
AttributeError: (see above)
</PRE><PRE>I must have made a mistake somewhere ....<BR>How can I do it =
?</PRE><PRE>Thanks by advance</PRE><PRE>&nbsp;&nbsp;&nbsp; SY
</PRE></FONT></BODY></HTML>

------=_NextPart_000_004D_01C00E81.C3401220--