Ticket #279 (closed defect: invalid)

Opened 6 years ago

Last modified 6 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:


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>
  File "/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line 439, in execute_manager
  File "/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line 380, in execute
  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
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 187, in __new__
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 231, in _prepare
  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'

Change History

comment:1 Changed 6 years ago by anonymous

Version info:

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

comment:2 Changed 6 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 6 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.

Note: See TracTickets for help on using tickets.