Any other suggestions? I'm really stumped here.
-- On Sun, Dec 30, 2012 at 3:35 PM, donarb <donarb@nwlink.com> wrote:
On Sunday, December 30, 2012 11:58:46 AM UTC-8, Sam Raker wrote:So I upped the verbosity like you said, and basically all it got me was a bunch of text telling me all the places Django didn't find my fixture before it finally did, and then the same error. Here's the full text of the error:Traceback (most recent call last):File "/home/menusadmin/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 190, in handlefor obj in objects:File "/home/menusadmin/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/django/core/serializers/pyyaml.py", line 62, in Deserializerraise DeserializationError(e)DeserializationError: maximum recursion depth exceeded while calling a Python objectI tried changing commit to False in loaddata.py, I tried adding a manager class to the one model I have that another model refers to with a natural key (e.g., 'name,' a CharField, as opposed to the primary key). I read something about loaddata having some unicode-related problems, so I added custom Manager classes for all my models that coerce appropriate fields to strings, e.g.:class MenuManager(models.Manager):def create_Menu(self,restaurant,year,location,status,pk,period,language):menu = self.create(restaurant=str(restaurant),year=int(year),location=str(location),status=str(status),pk=int(pk),period=str(period),language=str(language))return menuI'm still getting the exact same error. Help?Then the next thing I'd do is to test the yml data itself, separate from Django to make sure that the data is not corrupted in any way. Run a script like this, if it passes, then you probably have some sort of error in your models that is recursive.#!/usr/bin/env python
import yamlstream = open("test.yml", "r")print yaml.load(stream)Finally, I'd run./manage.py validateto make sure that all of your models are valid.To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WoMoRX8i3DsJ.--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment