I have a custom type in oracle (lro_dummy). I have also a procedure. I looks like this:
procedure dummyLro
(
i_dummy in lro_dummy,
o_dummy out lro_dummy
)is
begin
o_dummy := lro_dummy('asdf');
end dummyLro;
Now I want to call this procedure from python with cx_Oracle. This looks like this:
def test(db_con):
cur = db_con.cursor()
try:
procedure_params = {}
procedure_params["i_dummy"] = cur.var(cx_Oracle.OBJECT, typename="lro_dummy")
procedure_params["o_dummy"] = cur.var(cx_Oracle.OBJECT, typename="lro_dummy")
cur.callproc("test.dummyLro", [], procedure_params)
After that o_dummy
has a value because
str(procedures_params["o_dummy"])
returns
'<cx_Oracle.OBJECT with value <cx_Oracle.Object ???.LRO_DUMMY at 0x10492c9c0>>'
But I can not access my attribute. The attribute are listed in
procedure_params["o_dummy"].type.attributes
But I can not find the value in
procedure_params["o_dummy"]
What did I wrong?
I am using Python 3.6
, cx_Oracle 5.3
, InstantClient 11.2
, Oracle-Server 11