Zope error gotcha

While working my way through The Zope Book (2.6 edition), I finally got to the first practical example in the Using Basic Zope Objects chapter.

I created the example scripts as directed, diligently typed in the example templates and code (Copy paste works too, but I find when following programming tutorials that I memorize syntax more quickly if I type the examples out longhand), loaded the test form in the browser, and submitted it.

It crashed and burned with an error not remotely hinted at in the documentation. I checked and rechecked all of the code in all three of the application files, and everything was correct; parameters accounted for, no mismatched quotes, nothing.

It took me half an hour to figure out that I had misspelled the name of the Script (Python) object "calculateCompoundingInterest", which gets called by the interestRateDisplay template.

Instead of telling me that it couldn't find calculateCompoundingInterest, Zope was telling me that there was an error in it.

I'm sure there's an architectural reason for this behavior, and now that I know what the error caused by a missing object looks like I hopefully won't get stuck on this again, but it does seem peculiar.

Syndicate content

Twitter

  • Speaking of the 1990's http://www.hwg.org/ 4 years 15 weeks ago
  • "Oh, I see! You're like a webmaster from the 1990s, except you can't even code HTML." http://bit.ly/dsjBEX #fb 4 years 15 weeks ago
  • Please, please: DO NOT put a hyperlink on a filename unless clicking on said link actually downloads that file. #ihatesourceforge #uxfail 4 years 15 weeks ago
  • RT @ebertchicago:Josh reminds me: If we went back to what the Founding Fathers wanted, as Sarah Palin desires, she wouldn't be able to vote. 4 years 15 weeks ago
  • RT @tommysalami: Great "how I got into horror" blog post by @brittnahjade http://is.gd/c4dj8 Awwww :) 4 years 15 weeks ago

Older

Contact

Andy Chase
(978) 297-6402
andychase [at] gmail.com
GPG/PGP Public Key