Part of the data where error occurs is:
# or checking the Model here, neither of which is
good.
elif isinstance(field, datetime.datetime) and \
field.hour == field.minute == field.second ==
field.microsecond == 0:
yield field.date()
else:
yield field
for unresolved_row in cursor:
row = list(resolve_cols(unresolved_row))
if fill_cache:
obj, index_end = get_cached_row(self.model, row,
0)
else:
obj = self.model(*row[:index_end])
for i, k in enumerate(extra_select):
▼ Local vars
Variable Value
cursor <django.db.backends.oracle.base.FormatStylePlaceholderCursor on
<cx_Oracle.Connection to mix@CORD>>
extra_select []
fill_cache False
full_query 'SELECT "TESTDB_DBTEST"."ID", "TESTDB_DBTEST"."FECHA",
"TESTDB_DBTEST"."CARACTER", "TESTDB_DBTEST"."TEXTO",
"TESTDB_DBTEST"."MONTO"\n FROM "TESTDB_DBTEST" ORDER BY
"TESTDB_DBTEST"."FECHA" ASC'
get_cached_row <function get_cached_row at 0x013D1AB0>
index_end 5
params []
resolve_cols <function resolve_cols at 0x06EA56F0>
select ['"TESTDB_DBTEST"."ID"', '"TESTDB_DBTEST"."FECHA"',
'"TESTDB_DBTEST"."CARACTER"', '"TESTDB_DBTEST"."TEXTO"',
'"TESTDB_DBTEST"."MONTO"']
self Error in formatting:column at array pos 0 fetched with error:
1406
sql ' FROM "TESTDB_DBTEST" ORDER BY "TESTDB_DBTEST"."FECHA" ASC'
Tristan.
Unfortunately, cx_Oracle - and therefore Django/Oracle - doesn't
support UTF-8 yet.
What works for setting your environment to Latin1/ISO8859 (with
os.environ['NLS_LANG'] = 'American_America.WE8ISO8859P1'). If you make
sure you're whole website uses ISO8859 then Oracle will translate it
correctly to whatever character set your database uses (probably
UTF-8).
It's far from ideal, but it works.
Ciao,
- Matthias