Skip to content

Cannot pass python None-Type to procedure with custom DbObjectType #127

Closed Answered by anthony-tuininga
M4X1K02 asked this question in Q&A
Discussion options

You must be logged in to vote

You're missing one line of code:

cur.setinputsizes(typeObj)

This needs to be added just before the call to cur.execute(). The reason is because the value None doesn't contain any type information, so python-oracledb simply treats it as VARCHAR2 -- which is the wrong type. You must tell python-oracledb what type you intend to pass -- then the value None is acceptable. Hope that makes sense!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@M4X1K02
Comment options

Answer selected by M4X1K02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants