Opened 14 years ago

Last modified 14 years ago

#16265 closed Bug

DatabaseError: ORA-01403: no data found on Oracle — at Version 1

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 (last modified by Aymeric Augustin)

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!

Change History (1)

comment:1 by Aymeric Augustin, 14 years ago

Description: modified (diff)
Keywords: oracle added
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

Your description is a bit vague: "a particular log..."; it's hard to reproduce the bug with this information. It looks like in some circumstances, the Oracle backend reads more data than is available. Could you create an isolated test case that exhibits the problem?

Also, I see that you are using Django 1.1; that version is no longer supported (https://docs.djangoproject.com/en/dev/internals/release-process/#supported-versions). Is it possible to check if this bug also occurs in Django 1.3?

Note: See TracTickets for help on using tickets.
Back to Top