Closed RecycleBen closed 3 months ago
I have been able to replicate the problem and am discussing internally on how to resolve the matter since it appears to be a bug in the database itself and not the driver. I'll let you know once I discover the source of the issue.
Thanks Anthony!
I have confirmed that it is a bug in the database but I have a workaround that I am implementing in the driver. I'll let you know once I have it ready.
Ok. Great to hear there might be a workaround. Let us know. Thanks again!
I have pushed a patch with the workaround that should work for you. If you are able to build from source you can verify that.
Validated that it is working with the sample code above. Thanks!
This patch was included in version 2.1.1 which was just released.
It seems the callproc with a %ROWTYPE returns an error when Timestamp precedes a Varchar2 in the out variable. When you switch the order so that the timestamp is last there is no error. Or if you exclude the timestamp.
Template Info
platform.platform: Windows-10-10.0.19045-SP0 sys.maxsize > 2**32: True platform.python_version: 3.11.6 oracledb.version: 2.0.1
The following conditions raises an error "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 9: invalid start byte"
.callproc()
with an out variableNote when running this with the thick client, the error is not raised. Maybe because the timestamp is included in the Attributes for the returned
DbObjectType
in the thick client but not the thin?Stack Trace
Does your application call init_oracle_client()? When the error is raised no it is using the thin client.
Include a runnable Python script that shows the problem.
Create Schema as sysdba:
(We don't need all of these grants but that is what I used.)
PLSQL Setup Code:
(Note this is within the UncodeTest schema or use a different one. At first I had thought because we had Unicode characters we were getting this invalid start byte error because of the Unicode characters but it does error with just plain text.)
Python code: