Re: [Zope] Re: Exporting portal member data to csv
Here is error log. Time2007/02/28 10:41:23.080 GMT+7 User Name (User Id)admin (admin) Request URLhttp://localhost:8080/export Exception TypeAttributeError Exception Valueportal_memberdata Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module Products.ExternalMethod.ExternalMethod, line 225, in __call__ __traceback_info__: ((<Application at >,), {}, None) Module C:\Program Files\Plone 2\Data\Extensions\export.py, line 15, in createcsv AttributeError: portal_memberdata ----- Original Message ---- From: Paul Williams <pwilliams@diamonddata.com> To: zope@zope.org Cc: zope-db@zope.org Sent: Tuesday, February 27, 2007 8:22:36 PM Subject: [Zope] Re: Exporting portal member data to csv What does your log say? Win Myint Aung wrote:
When i run the external method in plone site, it shows errors.
The error shows.
Site Error
An error was encountered while publishing this resource.
*Error Type: AttributeError* *Error Value: portal_memberdata*
The following is the codings used in external methon.
# make heading row row = makeRow() row[0] = 'member_id' row[1] = 'password' writer.writerow(row)
for member in self.portal_membership.listMembers():
# make row for each member full of blank values row = makeRow() member_id = member.getId() user = acl_users.getUser(name=member_id) password = user._getPassword() row[0] = member_id row[1] = password writer.writerow(row)
request.RESPONSE.setHeader('Content-Type','application/csv') request.RESPONSE.setHeader('Content-Length',len(text.getvalue()))
request.RESPONSE.setHeader('Content-Disposition','inline;filename=%smembers.csv' %
time.strftime("%Y%m%d-%H%M%S-",time.localtime())) return text.getvalue()
------------------------------------------------------------------------ TV dinner still cooling? Check out "Tonight's Picks" <http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/> on Yahoo! TV.
------------------------------------------------------------------------
_______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
_______________________________________________ Zope maillist - Zope@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 ) ____________________________________________________________________________________ It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/
* Module ZPublisher.Publish, line 115, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 41, in call_object * Module Products.ExternalMethod.ExternalMethod, line 225, in __call__ __traceback_info__: ((<Application at >,), {}, None) * Module C:\Program Files\Plone 2\Data\Extensions\export.py, line 15, in createcsv
What code do you have in export.py, especially what is in line 15? -- Maciej Wisniowski
participants (2)
-
Maciej Wisniowski -
Win Myint Aung