#19159: loaddata reports DeserializationError instead of MemoryError -------------------------------+-------------------- Reporter: django@… | Owner: nobody Type: Bug | Status: new Component: Uncategorized | Version: 1.4 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- The command `manage.py loaddata data.json` errors with DeserializationError instead of MemoryError.
files: {{{ ../lib/python2.7/site-packages/django/core/serializers/json.py /usr/lib/python2.7/json/__init__.py }}} relevant code is `simplejson.load(stream)` inside the `try`: {{{ def Deserializer(stream_or_string, **options): """ Deserialize a stream or string of JSON data. """ if isinstance(stream_or_string, basestring): stream = StringIO(stream_or_string) else: stream = stream_or_string try: for obj in PythonDeserializer(simplejson.load(stream), **options): yield obj except GeneratorExit: raise except Exception, e: # Map to deserializer error raise DeserializationError(e) }}} -- Ticket URL: <https://code.djangoproject.com/ticket/19159> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.