﻿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
10006	r9707 breaks dumpdata if you have python-json installed on a Debian based system and python2.4	markmuetz	Malcolm Tredinnick	"On a Debian system with python2.4, if you've got the package python-json installed, then running {{{./manage.py dumpdata}}} raises an error: {{{AttributeError: 'module' object has no attribute 'JSONEncoder'}}}. This only happens if you're using r9707 or newer though. A workaround is to remove python-json.

I see a similar error on Ubuntu (with python2.5). If you've got python-json and don't have python-simplejson installed, then you see the same error in the same conditions. Either removing python-json or installing python-simplejson fixes it in this case.

I think this is due to older versions of python having more than one type of json lib. When the line {{{from django.utils import simplejson}}} is run, it goes to django/utils/simplejson/__init__.py which tries to use system versions of the json libs, and falls back on the one bundled with django. The old json package/module (python-json) doesn't have the right methods, so it raises an {{{AttributeError}}}. A simple fix is to test for {{{JSONEncoder}}} in the imported module, which is what the patch does."		closed	Core (Serialization)	dev		fixed			Accepted	1	0	0	0	0	0
