﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33847	`dumpdata` commands fails when invoked programmatically (but runs fine from commandline)	Frederic Brodbeck	nobody	"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}}}"	Bug	closed	Core (Management commands)	3.2	Normal	invalid			Unreviewed	0	0	0	0	0	0
