Search code examples
djangodjango-modelsoracle-xecx-oracleinspectdb

Inspectdb in Oracle-Django gets OCI-22061: invalid format text [T


I'm using Oracle Database 10g xe universal Rel.10.2.0.1.0 against cx_Oracle-5.0.4-10g-unicode-py26-1.x86_64 on a django project on Ubuntu 10.04

My db is generated by Oracle 10gr2 enterprise edition (on Windows XP, import done in US7ASCII character set and AL16UTF16 NCHAR character set, import server uses AL32UTF8 character set, export client uses EL8MSWIN1253 character set)

When I try django-admin.py inspectdb I get the following error:

......."indexes = connection.introspection.get_indexes(cursor, table_name) File "/usr/lib/pymodules/python2.6/django/db/backends/oracle/introspection.py", line 116, in get_indexes for row in cursor.fetchall(): File "/usr/lib/pymodules/python2.6/django/db/backends/oracle/base.py", line 483, in fetchall for r in self.cursor.fetchall()]) cx_Oracle.DatabaseError: OCI-22061: invalid format text [T".

I am aware of "inspectdb works with PostgreSQL, MySQL and SQLite" but as I understand from other posts it also works with Oracle somehow.

Does anyone know why I get this error or how I could fix it?


Solution

  • can you try it with updating cx_Oracle 5.1.1 package, then try this:

    python manage.py inspectdb --database dbname