<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Here is error log. </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">
<TABLE>
<TBODY>
<TR>
<TH vAlign=top align=left>
<P>Time</P></TH>
<TD>2007/02/28 10:41:23.080 GMT+7</TD></TR>
<TR>
<TH vAlign=top align=left>User Name (User Id)</TH>
<TD>admin (admin)</TD></TR>
<TR>
<TH vAlign=top align=left>Request URL</TH>
<TD>http://localhost:8080/export</TD></TR>
<TR>
<TH vAlign=top align=left>Exception Type</TH>
<TD>AttributeError</TD></TR>
<TR>
<TH vAlign=top align=left>Exception Value</TH>
<TD>portal_memberdata</TD></TR></TBODY></TABLE>
<DIV>
<P>Traceback (innermost last):
<UL>
<LI>Module ZPublisher.Publish, line 115, in publish
<LI>Module ZPublisher.mapply, line 88, in mapply
<LI>Module ZPublisher.Publish, line 41, in call_object
<LI>Module Products.ExternalMethod.ExternalMethod, line 225, in __call__<BR>__traceback_info__: ((<Application at >,), {}, None)
<LI>Module C:\Program Files\Plone 2\Data\Extensions\export.py, line 15, in createcsv </LI></UL>AttributeError: portal_memberdata <BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Paul Williams <pwilliams@diamonddata.com><BR>To: zope@zope.org<BR>Cc: zope-db@zope.org<BR>Sent: Tuesday, February 27, 2007 8:22:36 PM<BR>Subject: [Zope] Re: Exporting portal member data to csv<BR><BR>
<DIV>What does your log say?<BR><BR>Win Myint Aung wrote:<BR>> When i run the external method in plone site, it shows errors.<BR>> <BR>> The error shows.<BR>> <BR>> <BR>> <BR>> Site Error<BR>> <BR>> An error was encountered while publishing this resource.<BR>> <BR>> *Error Type: AttributeError*<BR>> *Error Value: portal_memberdata*<BR>> <BR>> <BR>> <BR>> The following is the codings used in external methon.<BR>> <BR>> # make heading row<BR>> row = makeRow()<BR>> row[0] = 'member_id'<BR>> row[1] = 'password'<BR>> writer.writerow(row)<BR>> <BR>> for member in
self.portal_membership.listMembers():<BR>> <BR>> # make row for each member full of blank values<BR>> row = makeRow()<BR>> member_id = member.getId()<BR>> user = acl_users.getUser(name=member_id)<BR>> password = user._getPassword()<BR>> row[0] = member_id<BR>> row[1] = password<BR>> writer.writerow(row)<BR>> <BR>> request.RESPONSE.setHeader('Content-Type','application/csv')<BR>>
request.RESPONSE.setHeader('Content-Length',len(text.getvalue()))<BR>> <BR>> request.RESPONSE.setHeader('Content-Disposition','inline;filename=%smembers.csv' <BR>> %<BR>> <BR>> time.strftime("%Y%m%d-%H%M%S-",time.localtime()))<BR>> return text.getvalue()<BR>> <BR>> <BR>> <BR>> <BR>> ------------------------------------------------------------------------<BR>> TV dinner still cooling?<BR>> Check out "Tonight's Picks" <BR>> <<A href="http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/" target=_blank>http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/</A>> on Yahoo! TV.<BR>> <BR>> <BR>>
------------------------------------------------------------------------<BR>> <BR>> _______________________________________________<BR>> Zope-DB mailing list<BR>> Zope-DB@zope.org<BR>> <A href="http://mail.zope.org/mailman/listinfo/zope-db" target=_blank>http://mail.zope.org/mailman/listinfo/zope-db</A><BR><BR>_______________________________________________<BR>Zope maillist - Zope@zope.org<BR><A href="http://mail.zope.org/mailman/listinfo/zope" target=_blank>http://mail.zope.org/mailman/listinfo/zope</A><BR>** No cross posts or HTML encoding! **<BR>(Related lists - <BR><A href="http://mail.zope.org/mailman/listinfo/zope-announce" target=_blank>http://mail.zope.org/mailman/listinfo/zope-announce</A><BR><A href="http://mail.zope.org/mailman/listinfo/zope-dev" target=_blank>http://mail.zope.org/mailman/listinfo/zope-dev</A> )</DIV></DIV><BR></DIV></div><br>
<hr size=1>It's here! Your new message!<br>Get
<a href="http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/"> new email alerts</a> with the free <a href="
http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/">Yahoo! Toolbar.</a></body></html>