[Zope] guarded_getitem and zsql method results

Evan Simpson evan@4-am.com
Wed, 5 Sep 2001 09:31:15 -0400


From: <Shriek@gmx.co.uk>
> >   File C:\PROGRA~1\ZOPE-L~1\bin\lib\string.py, line 114, in split
> >   File C:\PROGRA~1\ZOPE-L~1\lib\python\DateTime\DateTime.py, line
1106, in
> > __getattr__
> > AttributeError: split

You're trying to split a DateTime object, not a string, and the Python
2.1 implementation of string.split is confusing you -- it gives the
wrong error message since it has been reimplemented as something like:

def split(s, *args):
  return s.split(*args)

You need to convert the DateTime into a string, using one of its methods
such as Date().

Cheers,

Evan @ Zope & 4-am