[Zope] Error Value: len() of unsized object at SQL method

Kerekes Lajos lkerekes@xperts.hu
Thu, 30 Aug 2001 10:45:23 +0200


Here is the traceback:
Traceback (innermost last):
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
223, in publish_module
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/Zope/__init__.py,
line 221, in zpublisher_exception_hook
    (Object: monitorToolForm)
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
171, in publish
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/ZPublisher/mapply.py, line
160, in mapply
    (Object: showTrState)
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/ZPublisher/Publish.py, line
112, in call_object
    (Object: showTrState)
  File /usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/OFS/DTMLMethod.py,
line 189, in __call__
    (Object: showTrState)
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/DocumentTemplate/DT_String.py,
line 540, in __call__
    (Object: showTrState)
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/DocumentTemplate/DT_Let.py,
line 149, in render
    (Object: stateofscript="manipulateZSQL(this())")
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/DocumentTemplate/DT_In.py,
line 652, in renderwob
    (Object: manipulatedSelect)
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/Shared/DC/ZRDB/DA.py, line
489, in __call__
    (Object: manipulatedSelect)
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/Products/ZOracleDA/db.py,
line 221, in query
  File
/usr/local/zope/Zope-2.3.3-linux2-x86/lib/python/Products/ZOracleDA/db.py,
line 229, in _lobConvert
TypeError: (see above)

The DTML works if the query has result. But if hasn't, I get this error.
I use ZOracleDA 2.2.0-b1, and Oracle 8i under Linux.

   Lajos

Peter Bengtsson wrote:

> There's nothing wrong with the DTML.
>
> Paste the traceback in and we'll help you.
> And decide which works. Does that ZSQL method work independent of how you
> use it?
> Does the DTML work when looping on something else than that object?
>
> Cheers, Peter
>
> > Hello!
> >
> > I have an SQL select. If it gives no result, I get this error message
> > Error Type: TypeError
> > Error Value: len() of unsized object
> >
> > How can I manage it?
> >  I tried this:
> > <dtml-in ZSQLSelect>
> > foo, bar.....
> > <dtml-else>
> > no result
> > </dtml-in>
> >
> > but still get the error.
> >
> >    Thanks:
> >
> >     Lajos Kerekes
> >
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )