#33847: `dumpdata` commands fails when invoked programmatically (but runs fine 
from
commandline)
-------------------------------------+-------------------------------------
               Reporter:  Frederic   |          Owner:  nobody
  Brodbeck                           |
                   Type:  Bug        |         Status:  new
              Component:  Core       |        Version:  3.2
  (Management commands)              |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I want to run django's ''dumpdata'' command programmatically, however

 {{{
 from django.core.management import call_command
 call_command('dumpdata', 'asdf', indent=2, output=filePath)
 }}}
 fails with {{{ Unable to serialize database: 'ascii' codec can't encode
 character '\xdf' in position 83: ordinal not in range(128). }}}

 running {{{ python3 manage.py dumpdata --indent=2 --output=dump.json.gz
 asdf }}} from the command line works fine though!

 why won't it work with {{{call_command()}}}?


 ----

 - python version: {{{3.6.9}}}
 - django version: {{{3.2.13}}}
 - {{{$LANG}}} is set to {{{en_US.UTF-8}}}
 - {{{$LC_ALL}}} is set to {{{en_US.UTF-8}}}
 - {{{$LC_CTYPE}}} is set to {{{UTF-8}}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33847>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018201bb0e4a-61326160-9003-4199-8e3e-98e8adb898c2-000000%40eu-central-1.amazonses.com.

Reply via email to