Re: [Zope-dev] Survey: most obscure errors
On Tue, Sep 14, 2010 at 12:00:58PM +0200, Marius Gedminas wrote: > What are the most obscure error conditions you've encountered while > developing Zopeish[1] applications? Trying to add a proxied object to the database gives an error that more or less clearly states this condition (proxies are unpickleable). Nevertheless, it might be confusing to newbies, and it does not give any clues about the place that caused the error, not even what was the proxied object. Albertas ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Survey: most obscure errors
On Tue, Sep 14, 2010 at 12:00, Marius Gedminas wrote: > What are the most obscure error conditions you've encountered while > developing Zopeish[1] applications? > > [1] ZTK, Grok, Bluebream, the old Zope 3.x KGSes all qualify. > > I'm talking about situations where the error message/traceback are > disconnected from the actual cause. Late answer: The really obscure ones are when there *is no error message*. Common in Plone (which may or may not be zopeish). ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Survey: most obscure errors
> From: Marius Gedminas > Date: Tue, Sep 14, 2010 at 11:00 AM > Subject: [Zope-dev] Survey: most obscure errors > To: zope-dev@zope.org > > > What are the most obscure error conditions you've encountered while > developing Zopeish[1] applications? > > [1] ZTK, Grok, Bluebream, the old Zope 3.x KGSes all qualify. > > I'm talking about situations where the error message/traceback are > disconnected from the actual cause. For example, forgetting to add a > security declaration in ZCML can cause TraversalError (because > ForbiddenAttribute is a subclass of AttributeError), which leads the > developer off to a wild goose chase looking for why the attribute is > missing (was it misspelled? did it come from an old database?) the first > few times this kind of error happens. > > One of the goals we came up with in the Zope Summit in Halle was to > identify the most annoying of these kinds of error messages and fix > them. I need your help for the identifying part! > > Marius Gedminas The most common confusing error that I encounter is when some underlying code has an AttributeError, but zope's traversal code doesn't tell me about that exception, it just tells me that the attribute several layers up could not be traversed. For example, there is a bug in a function like this: def format_data(foo): return "%d: %s" % (foo.id, foo.name) def baz(foo_id): foo = load_foo(foo_id) return format_data(foo) class FooView: @property def my_foo(self): return baz(self.context.foo_id) When the template tries to traverse view/my_foo, if foo doesn't have the "name" attribute, it fails, but it only tells you that my_foo couldn't be found on the view. I used to spend quite a bit of time trying to figure out whether I changed some configuration that caused this error. If the attribute was on a context object with a security wrapper, I would be checking that also. Now, I usually recognize that I have to add pdb.set_trace() inside of my_foo so that I can see where the AttributeError is really raised. I reported the bug two years ago, but I guess I didn't explain the problem very well. https://bugs.edge.launchpad.net/zope3/+bug/311062 -Edwin ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Survey: most obscure errors
Hi It doesn't happen to me any longer, cause I learned my lesson, but in the beginning I was always confused about the error message when an exception happened in the __init__ method of a view. The Exception gets caught, and interpreted as if the object object/view does not exist. I then always checked if I made a mistake in my zcml declaration or did something wrong with names. It never occured to me that the url was correct, but the __init__ method threw errors. Best regards, Patrick On Tue, Sep 14, 2010 at 12:00, Marius Gedminas wrote: > What are the most obscure error conditions you've encountered while > developing Zopeish[1] applications? > > [1] ZTK, Grok, Bluebream, the old Zope 3.x KGSes all qualify. > > I'm talking about situations where the error message/traceback are > disconnected from the actual cause. For example, forgetting to add a > security declaration in ZCML can cause TraversalError (because > ForbiddenAttribute is a subclass of AttributeError), which leads the > developer off to a wild goose chase looking for why the attribute is > missing (was it misspelled? did it come from an old database?) the first > few times this kind of error happens. > > One of the goals we came up with in the Zope Summit in Halle was to > identify the most annoying of these kinds of error messages and fix > them. I need your help for the identifying part! > > Marius Gedminas > -- > http://pov.lt/ -- Zope 3/BlueBream consulting and development > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkyPR7UACgkQkVdEXeem14+KfQCdEk2D4poDir5CKqL+0+svjHRV > YWsAnjndhGiLGatmmjje08lcj2pYkCyE > =XE/L > -END PGP SIGNATURE- > > ___ > Zope-Dev maillist - zope-...@zope.org > https://mail.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > https://mail.zope.org/mailman/listinfo/zope-announce > https://mail.zope.org/mailman/listinfo/zope ) > > ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Survey: most obscure errors
What are the most obscure error conditions you've encountered while developing Zopeish[1] applications? [1] ZTK, Grok, Bluebream, the old Zope 3.x KGSes all qualify. I'm talking about situations where the error message/traceback are disconnected from the actual cause. For example, forgetting to add a security declaration in ZCML can cause TraversalError (because ForbiddenAttribute is a subclass of AttributeError), which leads the developer off to a wild goose chase looking for why the attribute is missing (was it misspelled? did it come from an old database?) the first few times this kind of error happens. One of the goals we came up with in the Zope Summit in Halle was to identify the most annoying of these kinds of error messages and fix them. I need your help for the identifying part! Marius Gedminas -- http://pov.lt/ -- Zope 3/BlueBream consulting and development signature.asc Description: Digital signature ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )