Opened 14 years ago
Last modified 14 years ago
#16265 closed Bug
DatabaseError: ORA-01403: no data found on Oracle — at Initial Version
Reported by: | Tiziano | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.1 |
Severity: | Normal | Keywords: | oracle |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We had a strange problem today: filtering on a model on an object resulted in an ORA-01403: no data found (we use Oracle 11g). Objects is there indeed.
We found the problem to be a lob field (not in the where conditions at all!) that contained a particular log of our application (maybe some content to be escaped??). We updated with a blank value and now all the filtering works. Do you know if this could be a known bug and how can be corrected for future?
This is the code and the traceback for reference:
us=MyModel.objects.filter(pk=123456)
print us
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/db/models/query.py", line 68, in repr
data = list(self[:REPR_OUTPUT_SIZE + 1])
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/db/models/query.py", line 83, in len
self._result_cache.extend(list(self._iter))
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/db/models/query.py", line 238, in iterator
for row in self.query.results_iter():
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/db/models/sql/query.py", line 298, in results_iter
row = self.resolve_columns(row, fields)
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/db/backends/oracle/query.py", line 53, in resolve_columns
values.append(self.convert_values(value, field))
File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/db/backends/oracle/query.py", line 58, in convert_values
value = value.read()
DatabaseError: ORA-01403: no data found
Thanks in advance to all!