Hello<br>I wrote a feed aggregator using the module FeedParser. I stored the RSS feed url in a persistant content component and retrieved the feed data in the view class. But I thought that I should move the feed data into the content component class instead of retrieving it in the view class. I get a ForbiddenAttribute error when viewing the class 
<br><br>class Feed(Persistent):<br>&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;A class that stores the feed URLs&quot;&quot;&quot;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; implements(IFeed)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; __name__ = __parent__ = None<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; url=[]<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; def getRawFeedData(self):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return [feedparser.parse(item) for item in self.url]<br><br>class IFeed(Interface):<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; def getRawFeedData():<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;retrieves raw feed data&quot;&quot;&quot;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; url = List (
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title = u&quot;URL&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description = u&quot;URL for newsfeed&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required = True,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value_type=TextLine(title=u&quot;Tool&quot;)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>&nbsp;&nbsp;&nbsp; <br>The content component and the interface are registred as thus:<br><br>&nbsp; &lt;class class=&quot;.components.Feed&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;implements<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interface=&quot;zope.annotation.interfaces.IAttributeAnnotatable
&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;require<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; permission=&quot;zope.View&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interface =&quot;.interfaces.IFeed&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;require<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; permission=&quot;zope.ManageContent&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set_schema=&quot;.interfaces.IFeed&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/class&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;!-- marker interface for feed --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;interface<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interface=&quot;.interfaces.IFeed&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&quot;zope.app.content.interfaces.IContentType&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt;<br><br>And the browser class <br><br>class FeedView(BrowserPage):<br>&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;A view for the RSS feed aggregator object&quot;&quot;&quot;
<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; __call__ = ViewPageTemplateFile(&quot;feed_view.pt&quot;)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; def getMetadata(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;&quot;Retrieves the title and description of the feed aggregator from the persistant storage&quot;&quot;&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return IZopeDublinCore(self.context)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; def getFeed(self):<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; feeds=self.context.getRawFeedData()<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result=[]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for feed in feeds:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ######## it fails here #############
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result+=[(e.updated_parsed, feed.channel, e) for e in <span style="font-weight: bold;">feed.entries</span> ]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result.sort(reverse=True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return result<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>Which is registered in the following way
<br><br>&nbsp; &lt;!-- simple browser view of a single feed aggregator --&gt;<br>&nbsp; &lt;browser:page<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for=&quot;kousai.feedreader.interfaces.IFeed&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=&quot;index.html&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class=&quot;kousai.feedreader.browser.components.FeedView
&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; permission=&quot;zope.View&quot;<br>&nbsp;&nbsp;&nbsp; /&gt;&nbsp;&nbsp; <br><br>The traceback<br><br>...<br><br>&nbsp; File &quot;/Users/admin/Zope-3.3.1/build/lib.darwin-8.9.0-Power_Macintosh-2.4/zope/tales/tales.py&quot;, line 696, in evaluate
<br>&nbsp;&nbsp;&nbsp; return expression(self)<br>&nbsp;&nbsp; - /Users/mikaelmoutakis/zpi/myfiles/kousai/feedreader/browser/feed_view.pt<br>&nbsp;&nbsp; - Line 15, Column 2<br>&nbsp;&nbsp; - Expression: &lt;PythonExpr ( view.getFeed()[0:10])&gt;<br>&nbsp;&nbsp; - Names:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&#39;args&#39;: (),
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;context&#39;: &lt;kousai.feedreader.components.Feed object at 0x3772c70&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;default&#39;: &lt;object object at 0x41560&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;loop&#39;: {},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;nothing&#39;: None,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;options&#39;: {},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;repeat&#39;: {},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;request&#39;: &lt;zope.publisher.browser.BrowserRequest instance URL=<a href="http://localhost:8080/++skin++Kousai/feed/index.html">http://localhost:8080/++skin++Kousai/feed/index.html
</a>&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;template&#39;: &lt;zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile object at 0x307d3f0&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;usage&#39;: &lt;zope.pagetemplate.pagetemplate.TemplateUsage object at 0x37e35d0&gt;,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;view&#39;: &lt;zope.app.publisher.browser.viewmeta.FeedView object at 0x37e3270&gt;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;views&#39;: &lt;zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object at 0x37e3250&gt;}<br>&nbsp; File &quot;/Users/admin/Zope-
3.3.1/build/lib.darwin-8.9.0-Power_Macintosh-2.4/zope/tales/pythonexpr.py&quot;, line 59, in __call__<br>&nbsp;&nbsp;&nbsp; return eval(self._code, vars)<br>&nbsp;&nbsp; - __traceback_info__: ( view.getFeed()[0:10])<br>&nbsp; File &quot;&lt;string&gt;&quot;, line 0, in ?
<br>&nbsp; File &quot;/Users/mikaelmoutakis/zpi/myfiles/kousai/feedreader/browser/components.py&quot;, line 39, in getFeed<br>&nbsp;&nbsp;&nbsp; result+=[(e.updated_parsed, feed.channel, e) for e in feed.entries ]<br><span style="font-weight: bold;">
ForbiddenAttribute: (&#39;entries&#39;</span>, {&#39;feed&#39;: {&#39;publisher&#39;.....<br>....<br><br>Haven&#39;t I declared the getRawFeedData method by including it in the IFeed interface? <br><br>Thanks!<br><br>/Mikael M
<br><br>