Skip to content

Oracle Type 0 Not Supported #212

@josh-cajina

Description

@josh-cajina

I'm currently using Python 3.6.4 with cx_Oracle 6.4 in Windows Server 2012 R2 and i'm getting this error when i'm trying to Access a NUMERIC type attribute of my User Defined type, it Works with the rest of the attributes, but in this particular case i'm getting an "Oracle Type 0 Not Supported".

The rest of the attributes are NUMBER, VARCHAR, etc. But this one is NUMERIC with precision 'NUMERIC(18, 10)'.

con = cx_Oracle.connect(connection_object.User, connection_object.Password, connection_object.Host)
cursor = con.cursor()
my_type = con.gettype("MY_TYPE")
custom_type = my_type.newobject()
params = (custom_type, ) # out param
reader = cursor.callproc("MY_PROCEDURE", params)

__table_type = reader[0].aslist()

for row in __table_type:
      print(row.ACOD) # NUMBER Works
      print(row.ANAME) # VARCHAR Works
      print(row.ALAT) # NUMERIC Raise an Exception

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions