[Zope-DB] O.K. Here's "real error"

Bo M. Maryniuck b.maryniuk@forbis.lt
Thu, 7 Nov 2002 20:10:05 +0200


On Thursday 07 November 2002 19:37, Matthew T. Kromer wrote:
> I'm going to prepend my answer instead of appending it ;)
;-) O.K. Now I catch a "real error", please see how (pure Python, no any =
Zope):

*bo@zope:(~) python
Python 2.2 (#1, Mar 26 2002, 15:46:04)=20
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import DCOracle2
>>> db =3D DCOracle2.connect('test/test@pman')
>>> c =3D db.cursor()
>>> c.procedure.pm.pm_02.CLOB_PRINT
<DCOracle2.DCOracle2.procedure instance at 0x81c976c>
>>> c.procedure.pm.pm_02.CLOB_PRINT()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/DCOracle2/DCOracle2.py", line 13=
71, in =20
__call__
    raise ValueError, "Not enough arguments"
ValueError: Not enough arguments
>>> c.procedure.pm.pm_02.CLOB_PRINT('PM_REQUEST_ATTACHEMENTS', 9653, '', =
200, 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/DCOracle2/DCOracle2.py", line 14=
92, in __call__
    cursor.execute(sql,__plist=3Dargs)
  File "/usr/lib/python2.2/site-packages/DCOracle2/DCOracle2.py", line 95=
9, in execute
    self._cursor.bindbypos(i, p)
dco2.DatabaseError: (932, 'ORA-00932: inconsistent datatypes')

See? *Inconsistent datatypes* Exactly the same error I got in Zope (sure,=
 why not... --=20
at least this is the same problem). Hmm... Let us see it again:

function PM.PM_02.CLOB_PRINT returns OUT BOOLEAN, has arguments:
         P_TABLE IN VARCHAR2
         P_ID IN NUMBER
         P_BUFFER IN OUT VARCHAR2
         P_AMOUNT IN OUT NUMBER
         P_POS IN NUMBER

vs.:

>>> c.procedure.pm.pm_02.CLOB_PRINT('PM_REQUEST_ATTACHEMENTS', 9653, '', =
200, 1)

Seems I've entered it correctly, isn't it?

> What this looks like is a bug in SP.py of DCOracle2 (gasp!) where some
> other error is causing the transaction to be aborted.  The _abort call =
is:
>
>    def _abort(self, *ignored):
>         self._v_db.db.rollback()

Yes, I know it, but newer tried to fix this, coz you can crash my face
for this code tweak. ;-)


--=20
Regards, Bogdan

=C4=AE Windows'=C5=B3 pakuot=C4=97s sud=C4=97ti greitai =C4=AFeis ir dant=
=C5=B3 pasta "Coolgates".