[Zope-DB] ZOracleDA 2.x behavior change? / TypeError: len() of unsized object

Matthew T. Kromer matt@zope.com
Thu, 05 Dec 2002 16:43:41 -0500


Chris Beaumont wrote:

> I have been moving a Zope 2.2x website that used the older 
> DCOracle/ZOracleDA to a new copy of Zope (2.5.1) that is using 
> DCOracle2/ZOracleDA 2.x - and have noticed that some ZSQL methods that 
> use the dtml-in tag seem to throw a "TypeError: len() of unsized 
> object" error when they do not have results when I am using the new 
> database adaptor.
>
> This is a big problem for me because I often use the presence or 
> absence of results to perform some test using a dtml-in or dtml-if.
>
> I am pretty sure that I am using valid DTML. Is this an FAQ or is 
> there something I need to change?
>
> Thank you,
> Chris 

The DA *should* behave consistently and return () (an empty tuple or 
list) when no results are found.  If you have an example data set that 
raises this error I can try to reproduce the problem.

-- 
Matt Kromer
Zope Corporation  http://www.zope.com/