DatabaseError: ORA-01403: no data found on Oracle
|Reported by:||Tiziano||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.1|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by aaugustin)
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 (2)
comment:1 Changed 5 years ago by aaugustin
- Description modified (diff)
- Keywords oracle added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Bug