Mailing List Archive

Zope 2.8 and DCOracle2 Stored Procedures
Hi!

Anydbody used Zope 2.8 and DCOracle2 Stored Procedures?

When I'm trying to execute such procedure on Zope 2.8 I get errors like
this:

Exception Type TypeError
Exception Value unbound method _lobConvert() must be called with DB
instance as first argument (got list instance instead)

Traceback (innermost last):
Module ZPublisher.Publish, line 113, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 40, in call_object
Module Products.DCOracle2.SP, line 328, in manage_testZOracleStoredProcedure
Module Products.DCOracle2.SP, line 301, in __call__
TypeError: unbound method _lobConvert() must be called with DB instance
as first argument (got list instance instead)

On Zope 2.7.x everything is OK. Any ideas what is wrong??

--
Maciej Wisniowski
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: Zope 2.8 and DCOracle2 Stored Procedures [ In reply to ]
Maciej Wisniowski wrote at 2005-6-23 10:28 +0200:
> ...
>Module Products.DCOracle2.SP, line 301, in __call__
>TypeError: unbound method _lobConvert() must be called with DB instance
>as first argument (got list instance instead)
>
>On Zope 2.7.x everything is OK. Any ideas what is wrong??

Look at line 301 of "DCOracle2/SP.py" and check the implicated
object and its type.

--
Dieter
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: Zope 2.8 and DCOracle2 Stored Procedures [ In reply to ]
> Look at line 301 of "DCOracle2/SP.py" and check the implicated
> object and its type.

Thanks but I think I've already did the thing, and I've even written
a post about this but... I've sent it only to myself, not to the group :D

As I can see there
http://cvs.zope.org/Products/DCOracle2/SP.py

I'm using older version of DCOracle2 (before chrisw changes)



I've changed SP.py:

line:
return self._lobConvert(results)

to:
return self._lobConvert(self._v_db, results)


Then I've received attribute error about sortKey method.
I've added method:

def sortKey(self):
""" Important for Zope 2.8"""
return 1

to Procedure class in SP.py (and to DB class in db.py - just in case)
and it seems to work now :)


Tomorrow I'll try with chrisw version too.

--
Maciej Wisniowski
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db