Ticket #133 (closed defect: worksforme)

Opened 5 years ago

Last modified 5 years ago

Error when removing m2m field

Reported by: Erik Allik <eallik@…> Owned by: andrew
Priority: major Milestone: 0.6
Component: commands Version: 0.6-pre
Keywords: startmigration Cc:


When removing an m2m field from a model and using the --auto flag to generate a migration, I get the following error traceback:

$ startmigration localsite --auto remove_eating_places_from_dish
 - Deleted field ''
Traceback (most recent call last):
  File "/Users/erik/projects/headisu/bin/", line 5, in <module>
    pkg_resources.run_script('Django==1.1-beta-1', '')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/", line 448, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/", line 1166, in run_script
    execfile(script_filename, namespace, namespace)
  File "/Users/erik/projects/headisu/lib/python2.5/site-packages/Django-1.1_beta_1-py2.5.egg/EGG-INFO/scripts/", line 5, in <module>
  File "/Users/erik/projects/headisu/lib/python2.5/site-packages/Django-1.1_beta_1-py2.5.egg/django/core/management/", line 350, in execute_from_command_line
  File "/Users/erik/projects/headisu/lib/python2.5/site-packages/Django-1.1_beta_1-py2.5.egg/django/core/management/", line 304, in execute
  File "/Users/erik/projects/headisu/lib/python2.5/site-packages/Django-1.1_beta_1-py2.5.egg/django/core/management/", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/erik/projects/headisu/lib/python2.5/site-packages/Django-1.1_beta_1-py2.5.egg/django/core/management/", line 222, in execute
    output = self.handle(*args, **options)
  File "/Users/erik/projects/headisu/lib/python2.5/site-packages/South-0.5-py2.5.egg/south/management/commands/", line 393, in handle
    field.m2m_column_name()[:-3], # strip off the '_id' at the end
AttributeError: 'ManyToManyField' object has no attribute 'm2m_column_name'

(My appologies if this is a duplicate)


Change History

comment:1 Changed 5 years ago by andrew

Are you on Django 1.0 or 1.1?

comment:2 Changed 5 years ago by Erik Allik <eallik@…>

I'm on SVN trunk, so 1.1.

comment:3 Changed 5 years ago by andrew

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

This seems to work on trunk now; I suspect it was some instability there (there was another similar bug around the same time to do with the field API mysteriously changing).


Add a comment

Modify Ticket

as closed

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

Note: See TracTickets for help on using tickets.