error with command 'python manage.py evolve --hint --execute

7 views
Skip to first unread message

imosquer

unread,
Feb 6, 2009, 2:11:22 PM2/6/09
to Django Evolution
for the command:
imosquera$ python manage.py evolve --hint --execute

I get the following error:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)
File "/Library/Python/2.5/site-packages/django/core/management/
__init__.py", line 340, in execute_manager
utility.execute()
File "/Library/Python/2.5/site-packages/django/core/management/
__init__.py", line 295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Library/Python/2.5/site-packages/django/core/management/
base.py", line 77, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Library/Python/2.5/site-packages/django/core/management/
base.py", line 96, in execute
output = self.handle(*args, **options)
File "/Library/Python/2.5/site-packages/django_evolution-0.0.0-
py2.5.egg/django_evolution/management/commands/evolve.py", line 99, in
handle
app_sql.extend(mutation.mutate(app_label, database_sig))
File "/Library/Python/2.5/site-packages/django_evolution-0.0.0-
py2.5.egg/django_evolution/mutations.py", line 261, in mutate
return self.add_column(app_label, proj_sig)
File "/Library/Python/2.5/site-packages/django_evolution-0.0.0-
py2.5.egg/django_evolution/mutations.py", line 267, in add_column
model = MockModel(proj_sig, app_label, self.model_name, model_sig)
File "/Library/Python/2.5/site-packages/django_evolution-0.0.0-
py2.5.egg/django_evolution/mutations.py", line 109, in __init__
self._meta = MockMeta(proj_sig, app_name, model_name, model_sig,
stub)
File "/Library/Python/2.5/site-packages/django_evolution-0.0.0-
py2.5.egg/django_evolution/mutations.py", line 59, in __init__
field = create_field(proj_sig, field_name, field_type, field_sig)
File "/Library/Python/2.5/site-packages/django_evolution-0.0.0-
py2.5.egg/django_evolution/mutations.py", line 26, in create_field
related_model_sig = proj_sig[related_app_name][related_model_name]
KeyError: 'users'

all i did was add one date field. seems simple enough. anybody else
get this error?

imosquer

unread,
Feb 6, 2009, 4:07:05 PM2/6/09
to Django Evolution
I found the error. This was the error:

app1.models referenced a ForeignKey in app2.model however app2 was NOT
in django's settings.py and did not get persisted. I hope this helps
and maybe you can add messaging to do so.

Russell Keith-Magee

unread,
Feb 7, 2009, 12:09:11 AM2/7/09
to django-e...@googlegroups.com
On Sat, Feb 7, 2009 at 6:07 AM, imosquer <imos...@gmail.com> wrote:
>
> I found the error. This was the error:
>
> app1.models referenced a ForeignKey in app2.model however app2 was NOT
> in django's settings.py and did not get persisted. I hope this helps
> and maybe you can add messaging to do so.

What would be really helpful would be the models that you were
evolving, in the pre and post evolution state. The error message is
helpful, but it only tells us what went wrong, not how you made it go
wrong.

Yours,
Russ Magee %-)

Reply all
Reply to author
Forward
0 new messages