Opened 7 years ago

Closed 7 years ago

#16265 closed Bug (needsinfo)

DatabaseError: ORA-01403: no data found on Oracle

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/", 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/", line 83, in __len__
  File "/usr/lib/python2.5/site-packages/Django-1.1-py2.5.egg/django/db/models/", 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/", 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/", 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/", line 58, in convert_values
    value =
DatabaseError: ORA-01403: no data found

Thanks in advance to all!

Change History (2)

comment:1 Changed 7 years ago by Aymeric Augustin

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 ( Is it possible to check if this bug also occurs in Django 1.3?

comment:2 Changed 7 years ago by Russell Keith-Magee

Resolution: needsinfo
Status: newclosed

I'm going to close this needsinfo. It sounds like there *might* be a legitimate bug in here, but the report is too vague for it to be actionable on our part.

Feel free to reopen if you can:

  • Confirm that it's still an issue with Django 1.3
  • Provide clear instructions for others to reproduce the problem
Note: See TracTickets for help on using tickets.
Back to Top