Modify

Ticket #279 (closed defect: invalid)

Opened 4 years ago

Last modified 4 years ago

Traceback when createing a new migration.

Reported by: anonymous Owned by: andrew
Priority: major Milestone:
Component: commands Version: 0.6.2
Keywords: Cc:

Description

I just updated to the latest trunk and now I can't create new migrations:

# ./manage.py startmigration leadsystem dummy_migration --auto
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 439, in execute_manager
    utility.execute()
  File "/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line 380, 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 "/usr/lib/python2.5/site-packages/south/management/commands/startmigration.py", line 236, in handle
    last_orm = migrations[-1].orm
  File "/usr/lib/python2.5/site-packages/south/orm.py", line 62, in __get__
    self.orm = FakeORM(*self._args)
  File "/usr/lib/python2.5/site-packages/south/orm.py", line 45, in FakeORM
    _orm_cache[args] = _FakeORM(*args)  
  File "/usr/lib/python2.5/site-packages/south/orm.py", line 106, in __init__
    self.models[name] = self.make_model(app_name, model_name, data)
  File "/usr/lib/python2.5/site-packages/south/orm.py", line 308, in make_model
    fields,
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 187, in __new__
    new_class._prepare()
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 231, in _prepare
    signals.class_prepared.send(sender=cls)
  File "/usr/lib/python2.5/site-packages/django/dispatch/dispatcher.py", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/lib/python2.5/site-packages/django/db/models/fields/related.py", line 84, in do_pending_lookups
    operation(field, sender, cls)
  File "/usr/lib/python2.5/site-packages/django/db/models/fields/related.py", line 106, in resolve_related_class
    field.do_related_class(model, cls)
  File "/usr/lib/python2.5/site-packages/django/db/models/fields/related.py", line 121, in do_related_class
    self.contribute_to_related_class(other, self.related)
  File "/usr/lib/python2.5/site-packages/django/db/models/fields/related.py", line 995, in contribute_to_related_class
    setattr(cls, related.get_accessor_name(), ManyRelatedObjectsDescriptor(related))
TypeError: attribute name must be string, not 'NoneType'

Attachments

Change History

comment:1 Changed 4 years ago by anonymous

Version info:

Django: trunk r11731
South: changeset: 524:69fbde7ac138

comment:2 Changed 4 years ago by anonymous

I just rolled back to Django r11628 and now it seems to work. So it must have something to do with one of the recent Django updates.

comment:3 Changed 4 years ago by andrew

  • Status changed from new to closed
  • Resolution set to invalid

Yes, that error usually means Django's internal ORM resolving isn't working right. If it continues to be an issue with the 1.2 code, we'll have a fix for it shortly, but it's more likely a temporary glitch.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.