Changes between Initial Version and Version 15 of Ticket #22377


Ignore:
Timestamp:
Jan 26, 2016, 7:54:41 AM (9 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22377

    • Property Resolutionneedsinfo
    • Property Status newclosed
    • Property Type UncategorizedBug
    • Property Version 1.61.9
  • Ticket #22377 – Description

    initial v15  
    11In django/db/backends/util.py, in CursorDebugWrapper.execute, the line:
    2 
     2{{{
    33 logger.debug('(%.3f) %s; args=%s' % (duration, sql, params),
    44                extra={'duration': duration, 'sql': sql, 'params': params}
    55            )
    6 
     6}}}
    77throws 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{{{
    99 logger.debug('(%.3f) %s; args=%s' % (duration, sql.decode('utf-8'), params),
    1010                extra={'duration': duration, 'sql': sql, 'params': params}
    1111            )
    12 
     12}}}
    1313I'm hoping there's a better and more elegant way that I could use.
    1414
Back to Top