-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LOB.read(0)
gives unhelpful error message in thin mode
#13
Comments
If we adjust the code so that it returns an empty string instead of raising an exception, would you consider that preferable? I don't find the thick driver error to be all that helpful either! The other option is to create a more meaningful error -- but it seems unnecessary. Thoughts? |
The most helpful would probably be:
BTW, passing a negative values currently results in:
so 0 is the only values with this behavour. The most elegant API would be support for slices for So instead of |
when the offset parameter to LOB.read() is zero or negative (#13).
I've added error DPY-2030 to address this situation for both thin and thick. If you want to create a new enhancement request for supporting slices with LOBs, please go ahead; otherwise, I'll close this when 1.1 is released. |
This enhancement has been implemented in python-oracledb 1.1.0 which was just released. |
The following Python script:
gives the following output:
In thick mode I get:
which at least gives a hint at what the problem is.
prints
The database is an Oracle XE.
returns
21.0.0.0.0
.The text was updated successfully, but these errors were encountered: