#22377: SQL Logging throws an exception when fields have utf-8 characters
-------------------------------------+-------------------------------------
     Reporter:  rolanvc@…            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  1.9
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:  sql logging for      |             Triage Stage:
  utf-8                              |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by marcinn):

 I can confirm similar issue when using raw queries directly via
 `connection.cursor().execute()`, when some parameters passed as `dict`
 contains unicode data. It happens for `Django 1.8.6`, `Python 2.7.11`,
 `psycopg2` driver and only when `DEBUG=True` is set. Currently I've
 applied workaround by using native cursor
 (`connection.cursor().cursor.execute()`.

 Exception is raised when DebugCursor is logging a sql
 (`logger.debug('(%.3f) [...]'`, at line 88 in `django.db.backends.utils`)

--
Ticket URL: <https://code.djangoproject.com/ticket/22377#comment:16>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/075.a5428c60d67b9f807d1035520f8ad24a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to