Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cannot successfully create field '...' for model '...': name '...' is not defined
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
equalium  
View profile  
 More options May 8 2009, 6:29 am
From: equalium <equal...@gmail.com>
Date: Fri, 8 May 2009 03:29:14 -0700 (PDT)
Local: Fri, May 8 2009 6:29 am
Subject: Cannot successfully create field '...' for model '...': name '...' is not defined
Hello, i've just installed trunk version.
I'm trying to migrate an existing app, the 0001_initial.py is created,
but trying to fake it, i get:

Cannot successfully create field 'distribuidor' for model 'equipo':
name 'Distribuidor' is not defined.

I have edited 0001_initial.py adding:

from distribuidores.models import Empresa as Distribuidor

as model 'equipo' uses

equipos.equipo': {
            ...,
            'distribuidor': ('models.ForeignKey', ['Distribuidor'],
{'null': 'True', 'blank': 'True'}),
            ...

'Distribuidor' is the imported name of the model 'empresa' from
another app.

But still get the same error.
This is the full sequence of the error:

./manage.py migrate equipos --fake
0001_initial
While loading migration 'equipos.0001_initial':
Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/usr/lib/python2.5/site-packages/django/core/management/
__init__.py", line 359, in execute_manager
    utility.execute()
  File "/usr/lib/python2.5/site-packages/django/core/management/
__init__.py", line 304, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.5/site-packages/django/core/management/
base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.5/site-packages/django/core/management/
base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/management/commands/migrate.py", line 84, in handle
    skip = skip,
  File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 397, in migrate_app
    tree = dependency_tree()
  File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 105, in dependency_tree
    tree = all_migrations()
  File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 100, in all_migrations
    for app in get_migrated_apps()
  File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 85, in get_migration
    migclass.orm = FakeORM(migclass, get_app_name(app))
  File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/orm.py", line 64, in __init__
    self.retry_failed_fields()
  File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/orm.py", line 240, in retry_failed_fields
    fname, modelname, e
ValueError: Cannot successfully create field 'distribuidor' for model
'equipo': name 'Distribuidor' is not defined.

Maybe this is not enough info to figure what's going on, but if
anybody has any idea of what can be wrong I'd appreciate any hint.

note: I am using south in a virtualenv.

Thank you.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrew Godwin  
View profile  
 More options May 8 2009, 1:09 pm
From: Andrew Godwin <and...@aeracode.org>
Date: Fri, 08 May 2009 18:09:48 +0100
Local: Fri, May 8 2009 1:09 pm
Subject: Re: Cannot successfully create field '...' for model '...': name '...' is not defined
I think this may well be a bug (specifically, bug #134). Now you've
provided a traceback, I can hopefully get it fixed; keep an eye on
http://south.aeracode.org/ticket/134

Andrew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »