Changes between Initial Version and Version 15 of Ticket #22377
- Timestamp:
- Jan 26, 2016, 7:54:41 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #22377
- Property Resolution → needsinfo
- Property Status new → closed
- Property Type Uncategorized → Bug
- Property Version 1.6 → 1.9
-
Ticket #22377 – Description
initial v15 1 1 In django/db/backends/util.py, in CursorDebugWrapper.execute, the line: 2 2 {{{ 3 3 logger.debug('(%.3f) %s; args=%s' % (duration, sql, params), 4 4 extra={'duration': duration, 'sql': sql, 'params': params} 5 5 ) 6 6 }}} 7 7 throws a "UnicodeDecodeError:ascii codec .... " when calling model.save() when some fields have utf-8/non-ascii values. My only workaround is to modify it to: 8 8 {{{ 9 9 logger.debug('(%.3f) %s; args=%s' % (duration, sql.decode('utf-8'), params), 10 10 extra={'duration': duration, 'sql': sql, 'params': params} 11 11 ) 12 12 }}} 13 13 I'm hoping there's a better and more elegant way that I could use. 14 14