Re: [Zope3-Users] z3c.form and subforms in an AddForm?
Hi again Hermann, Thanks again for replying -- the part that perplexed me was that none of my code was ever mentioned in the trackback -- I wasn't sure how I could be causing zope to recurse at all. It turned out that it couldn't find the form code because z3c.formui's zcml files weren't copied in the package includes directory, so zope kept falling back to my template.pt until it threw a recursion exception. So it was related to a series of other install errors (i didn't have macro installed correctly either, which is what causes the initial recursion error; once macro went in, I started getting adapter errors, which led me to check on formui, which wasn't in correctly either) -- for some reason, when I easy_install Z3C packages, their .zcml files don't end up in my zope skel directory. I finally figured our a bash command to compare all the .zcml files I should have all the ones I actually had. To avoid having such a goofy (and slightly embarrassing problem) in the future, does anyone have any recommendations on a document about getting a sane zope development environment setup? I thought it would be similar to getting my Plone environments set up, but this is obviously a bit different, and I'm no good at debugging the messages I get yet. Thanks all, ~Matt On 7/6/07, Hermann Himmelbauer <[EMAIL PROTECTED]> wrote: Am Freitag, 6. Juli 2007 03:14 schrieb Matt Bowen: > Stephan and Hermann, > maximum recursion depth exceeded That is a good hint, so you're recursively calling something. > > /opt/zope/zope- 3.4.0a1 > > /lib/python/zope/tal/talinterpreter.py(379)do_startEndTag() > -> self.do_startTag(stuff, self.endsep, self.endlen) I think I once had this, too, some time ago. The reason was something like calling a function from the template, that again rendered the template, calling the function again and so on, resulting in an endless recursion. Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] mkzopeapp to create project.package named applications?
Phillip, thanks for releasing mkzopeapp. I recently got started with a buildout-enabled zope-3 project by imitating the layout of z3c.formdemo. How would I use mkzopeapp to create a project.package name like z3c.formdemo, or is this not generally recommended for application packages? Thanks. $ usage: mkzopeapp create [options] PACKAGE_NAME $ mkzopeapp acme.acmesite Selected and implied templates: mkzopeapp#zope_app Package that contains a Zope application Variables: egg: acme.acmesite package: acmeacmesite project: acme.acmesite Creating template zope_app Creating directory ./acme.acmesite Recursing into +package+ Creating ./acme.acmesite/acmeacmesite/ Copying __init__.py to ./acme.acmesite/acmeacmesite/__init__.py Copying configure.zcml_tmpl to ./acme.acmesite/acmeacmesite/configure.zcml Copying develop.ini to ./acme.acmesite/acmeacmesite/develop.ini Copying main.py_tmpl to ./acme.acmesite/acmeacmesite/main.py Recursing into var Creating ./acme.acmesite/acmeacmesite/var/ Copying README.txt to ./acme.acmesite/acmeacmesite/var/README.txt Copying setup.py_tmpl to ./acme.acmesite/setup.py Running /usr/bin/python setup.py egg_info $ mkzopeapp AcmeSite Selected and implied templates: mkzopeapp#zope_app Package that contains a Zope application Variables: egg: AcmeSite package: acmesite project: AcmeSite Creating template zope_app Creating directory ./AcmeSite Recursing into +package+ Creating ./AcmeSite/acmesite/ Copying __init__.py to ./AcmeSite/acmesite/__init__.py Copying configure.zcml_tmpl to ./AcmeSite/acmesite/configure.zcml Copying develop.ini to ./AcmeSite/acmesite/develop.ini Copying main.py_tmpl to ./AcmeSite/acmesite/main.py Recursing into var Creating ./AcmeSite/acmesite/var/ Copying README.txt to ./AcmeSite/acmesite/var/README.txt Copying setup.py_tmpl to ./AcmeSite/setup.py Running /usr/bin/python setup.py egg_info ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] ForbiddenAttribute error
> I get a > ForbiddenAttribute error when viewing the class AFAIR ForbiddenAttribute means that you have no permissions for attribute you want to access. No permissions means that it is neither allowed nor denied :) You're using feed.entries: > result+=[(e.updated_parsed, feed.channel, e) for e in > feed.entries ] Seems that 'entries' are the cause of error (as Dennis already said) or something in this line. If 'feed' above is of type Feed then your's IFeed doesn't specify 'entries' attribute in it. This means no permissions are set to 'entries' and this may cause ForbiddenAttribute error. You may use pdb to simply debug what exactly causes the error. -- Maciej Wisniowski ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] ForbiddenAttribute error
HA! I spoke too soon. Your permissions are OK, zope.View has the right permissions. Sorry about that. Check the permissions on "entries" in your feed, that's where the backtrace points to. D ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] ForbiddenAttribute error
> permission="zope.ManageContent" > set_schema=".interfaces.IFeed" > /> > > > > Haven't I declared the getRawFeedData method by including it in the IFeed > interface? > > Thanks! > > /Mikael M Hi Mikael Rest assured you have a permissions problem. (ForbiddenError) For one thing, set_schema means that to set any attributes in that schema, you need this permission. But your method getRawFeedData is not a settable attribute, but a method. Notice that when you assign write permissions to a container (for example), you say interface="zope.app.container.interfaces.IWriteContainer", and not set_schema="..." You need set_schema (or set_attributes) for the list attribute, but you need interface (or attributes) for your getRawFeedData method, since you just want to call it. Add and it should work. Might not be the "best" way though but I am sure more knowledgable people will step in :) Hope it gets you closer Dennis ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] ForbiddenAttribute error
Hello 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 class Feed(Persistent): """A class that stores the feed URLs""" implements(IFeed) __name__ = __parent__ = None url=[] def getRawFeedData(self): return [feedparser.parse(item) for item in self.url] class IFeed(Interface): def getRawFeedData(): """retrieves raw feed data""" url = List ( title = u"URL", description = u"URL for newsfeed", required = True, value_type=TextLine(title=u"Tool") ) The content component and the interface are registred as thus: And the browser class class FeedView(BrowserPage): """A view for the RSS feed aggregator object""" __call__ = ViewPageTemplateFile("feed_view.pt") def getMetadata(self): """Retrieves the title and description of the feed aggregator from the persistant storage""" return IZopeDublinCore(self.context) def getFeed(self): feeds=self.context.getRawFeedData() result=[] for feed in feeds: it fails here # result+=[(e.updated_parsed, feed.channel, e) for e in feed.entries ] result.sort(reverse=True) return result Which is registered in the following way The traceback ... File "/Users/admin/Zope-3.3.1/build/lib.darwin- 8.9.0-Power_Macintosh-2.4/zope/tales/tales.py", line 696, in evaluate return expression(self) - /Users/mikaelmoutakis/zpi/myfiles/kousai/feedreader/browser/feed_view.pt - Line 15, Column 2 - Expression: - Names: {'args': (), 'context': , 'default': , 'loop': {}, 'nothing': None, 'options': {}, 'repeat': {}, 'request': http://localhost:8080/++skin++Kousai/feed/index.html>, 'template': < zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile object at 0x307d3f0>, 'usage': , 'view': , 'views': } File "/Users/admin/Zope-3.3.1/build/lib.darwin- 8.9.0-Power_Macintosh-2.4/zope/tales/pythonexpr.py", line 59, in __call__ return eval(self._code, vars) - __traceback_info__: ( view.getFeed()[0:10]) File "", line 0, in ? File "/Users/mikaelmoutakis/zpi/myfiles/kousai/feedreader/browser/components.py", line 39, in getFeed result+=[(e.updated_parsed, feed.channel, e) for e in feed.entries ] ForbiddenAttribute: ('entries', {'feed': {'publisher'. Haven't I declared the getRawFeedData method by including it in the IFeed interface? Thanks! /Mikael M ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form and subforms in an AddForm?
Am Freitag, 6. Juli 2007 03:14 schrieb Matt Bowen: > Stephan and Hermann, > maximum recursion depth exceeded That is a good hint, so you're recursively calling something. > > /opt/zope/zope-3.4.0a1 > > /lib/python/zope/tal/talinterpreter.py(379)do_startEndTag() > -> self.do_startTag(stuff, self.endsep, self.endlen) I think I once had this, too, some time ago. The reason was something like calling a function from the template, that again rendered the template, calling the function again and so on, resulting in an endless recursion. Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Zope 3.4.0b1 released
July 5, 2007 - The Zope 3 development team announces the Zope 3.4.0b1 release This release is the first beta release for Zope 3.4.0. It was preceeded by an alpha release in April. Since the beta we finished repackaging of eggs, added three new features and fixed more than 12 bugs, please see the change log for details. Zope 3.4 introduces support for binary large objects in the ZODB, provides a new postprocessing hook for publishing results and makes all Zope packages available as Python eggs. Development release and feedback This is a development release with beta quality. It is intended for developers to check their applications for compatibility with the new features. This release *is not intended to be used in production environments*. We would love to hear about any bugs you encounter. Please use our bug tracker, the mailing lists, and the IRC channel to contact us in case you encounter any problems. This beta release will be succeeded by a release candidate which is expected to be available by August 5, 2007. For status updates on our roadmap check: https://launchpad.net/zope3/3.4/+milestones What is Zope 3? --- Zope 3 is a web application server that continues to build on the heritage of Zope. It was rewritten from scratch based on the latest software design patterns and the experiences of Zope 2. The component architecture is the very core of Zope 3 that allows developers to create flexible and powerful web applications. Compatibility with Zope 2 -- We continue to work on the transition from Zope 2 to Zope 3 by making Zope 2 use more and more of the Zope 3 packages. But we're not there yet. **You can't run Zope 2 applications in Zope 3.** Downloads - Zope 3 can be downloaded from: http://zope.org/Products/Zope3 Installation instructions for both Windows and Un*x/Linux are now available in the top level README.txt file of the distribution. The binary installer is recommended for Windows. Zope 3.4 requires Python 2.4.3 to run. You must also have zlib installed on your system. Resources - - Zope 3 Development Web Site: http://wiki.zope.org/zope3 - Zope 3 Developers Mailing List: http://mail.zope.org/mailman/listinfo/zope3-dev - Zope 3 Users Mailing List: http://mail.zope.org/mailman/listinfo/zope3-users - Bug tracker at launchpad: https://launchpad.net/zope3 - IRC Channel: #zope3-dev at irc.freenode.net Acknowledgments --- Much thanks to everyone who contributed to this release: Jim Fulton, Dmitry Vasiliev, Martijn Faassen, Christian Theune, Wolfgang Schnerring, Fred Drake, Marius Gedminas, Baiju M, Brian Sutherland, Gary Poster ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users