#20572: locale fr_FR.UTF-8 breaks loaddata
--------------------------------+--------------------
     Reporter:  gerard.henry@…  |      Owner:  nobody
         Type:  Bug             |     Status:  new
    Component:  Uncategorized   |    Version:  1.5
     Severity:  Normal          |   Keywords:
 Triage Stage:  Unreviewed      |  Has patch:  0
Easy pickings:  0               |      UI/UX:  0
--------------------------------+--------------------
 Doing loaddata:
 {{{
 python manage.py loaddata -v 3 --traceback /tmp/mc1.json
 ...
 Traceback (most recent call last):
   File "/Users/me/python/virtualenv/django15x/lib/python2.7/site-
 packages/django/core/management/base.py", line 222, in run_from_argv
     self.execute(*args, **options.__dict__)
   File "/Users/me/python/virtualenv/django15x/lib/python2.7/site-
 packages/django/core/management/base.py", line 255, in execute
     output = self.handle(*args, **options)
   File "/Users/me/python/virtualenv/django15x/lib/python2.7/site-
 packages/django/core/management/commands/loaddata.py", line 226, in handle
     e.args = ("Problem installing fixtures: %s" % e,)
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 126:
 ordinal not in range(128)
 }}}
 changing line 226 in loaddata.py (replace %s by %r), i see the error:
 {{{
 IntegrityError: Problem installing fixtures: IntegrityError('insert or
 update on table "eventsmgmt_mycalendar" violates foreign key constraint
 "eventsmgmt_mycalendar_created_by_id_fkey"\nD\xc3\x89TAIL : Key
 (created_by_id)=(46) is not present in table "auth_user".\n',)
 }}}
 in the terminal, the locale is:
 {{{
 $localeLANG="fr_FR.UTF-8"
 LC_COLLATE="fr_FR.UTF-8"
 LC_CTYPE="fr_FR.UTF-8"
 LC_MESSAGES="fr_FR.UTF-8"
 LC_MONETARY="fr_FR.UTF-8"
 LC_NUMERIC="fr_FR.UTF-8"
 LC_TIME="fr_FR.UTF-8"
 LC_ALL=
 }}}

 the workaround is to change the locale to en_US:
 {{{
 $ export LANG=en_US.UTF-8
 }}}
 and it works

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20572>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.64720b0b1d1c9bbf43024dc173f36813%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to