Posts tagged 'zope' – Page 2

Plone/Zope: Utilising zope.testrecorder for unit testing

Writing unit tests (especial doctests) for your Plone product is reasonably time consuming. For us developers, having tested code is absolutely essential. This is especially true when clients are beating down your door looking for a fully functional product and you need to know what you’ve written works and isn’t going to fall over (just yet, anyway). Web apps are able to be tested using a multitude of frameworks, and whilst not the most fully featured (eg lacking Javascript support), Zope’s doctest machinery is right there within your Plone product. In order to write these, enter zope …

GenericSetup and “mismatched” tags in ZCML

Ever the issue-magnet, I’ve spent the better part of my morning trying to debug a mistmatched tag error from within some ZCML (aka XML for the non-initiated).  Essentially, the issue boiled down to the system telling me that it was certain that I had a mistmatched tag within my configuration, and presented me with the problematic XML tag (complete with line numbers).  However, life’s not always that simple.

The traceback looked like this:

Traceback (most recent call last):
zope.configuration.config.ConfigurationExecutionError: xml.parsers.expat.ExpatError: mismatched tag: line 6, column 70
in:
File "/home/david/buildout/src …

David tries Plone 4.0a2 (Part 1)

Plone 4 is approaching!  Excellent!  Lots of new features to play around with and plenty more things to have to fix with the upgrade.  I’ve been keeping tabs on the change log of updates and it’s looking really good. Lots of little, but significant, changes are afoot.  Now, how about actually installing the Alpha 2 version of Plone 4 to see it for real? Let’s do it!

My steps are not going to work on your computer.  I don’t think you’ll be able to follow my words/commands exactly, but here goes anyway about my …

Buildout: the biggest problems have the simplest answers…

..and how true that is.  Today’s time consumer is directly related to just 1 misplaced line of a buildout configuration (and presumably something that’s changed somewhere else).

The result

After much hunting and hunting, it turns out my Zope2 Fake Eggs weren’t being generated.

On my long quest I had to go through downloading new packages and trying to find something that had changed and even trying to establish new virtual environments on different VMs.  Nothing would fix the problem. To rub salt in the wound, my desktop Ubuntu ran the buildout fine, so methinks the underlying …

DateTime in Python/Zope/Plone is painful

Alright, now for today’s problem:  why do two dates that look different when outputted actually end up being the same date?

Answer: I’m not sure, but I’m pretty sure it’s got something to do with the wacky support the above-mentioned 3 products have for timezones.

The background: Plone stores a DateTime object to record a user’s last login time.  It doesn’t really matter what’s purpose is, because Plone (this time) isn’t at fault.  The DateTime gets stored, no worries.  The problem arises when you try to put that value back into a …

Virtualenv, Plone, and Ubuntu 9.04 Jaunty

What a complicated situation it is trying to use all of the above-mentioned pieces of software together. In all seriousness, Virtualenv is now appearing to be the best thing since sliced bread for me to help out with making Plone/Zope usable under Jaunty.

By default, as everyone should know by now, a whole bunch of old Python 2.4 packages got removed from Jaunty, throwing us Plone developers into peril.  Well, those of us who hadn’t discovered the joys of virtualenv yet, that is.

Here’s how to convert an existing buildout folder over to Virtualenv without too …

Buildout: Trying to create a Plone/Zope instance

Eeek…what’s this mean?

install() got an unexpected keyword argument 'allow_hosts'

after trying to build zope2zeoserver from my buildout configuration.

After some searching, I found that it was due to my bootstrap.py script (the one the gets buildout in the first place and creates the relevant scripts) was actually pulling down an outdated version of zc.buildout. So, the problem results because this old version of buildout doesn’t have a clue how to handle the given argument.

Solution: update the buildout. For me, that meant correcting the bootstrap script, but for you, it could be a matter …