Ticket #310 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

KeyError: 'db'

Reported by: bryan Owned by: andrew
Priority: major Milestone: 0.7
Component: databaseapi Version: 0.7-pre
Keywords: Cc:


Don't really know what else to say about this other than the fact that the migrations it seems to choke on are ones having to do with GenericRelations. I'm running Django trunk (post multi-db) and the 0.7 branch:

unning migrations for releases:
 - Migrating forwards to 0003_adding_name_kanji_tags.
 > releases:0001_initial
 > releases:0002_updated_to_modified
 > releases:0003_adding_name_kanji_tags
Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
  File "/home/bryan/.local/lib/python2.6/site-packages/django/core/management/__init__.py", line 439, in execute_manager
  File "/home/bryan/.local/lib/python2.6/site-packages/django/core/management/__init__.py", line 380, in execute
  File "/home/bryan/.local/lib/python2.6/site-packages/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/bryan/.local/lib/python2.6/site-packages/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/home/bryan/.local/lib/python2.6/site-packages/south/management/commands/migrate.py", line 94, in handle
    skip = skip,
  File "/home/bryan/.local/lib/python2.6/site-packages/south/migration/__init__.py", line 166, in migrate_app
    success = migrator.migrate_many(target, workplan)
  File "/home/bryan/.local/lib/python2.6/site-packages/south/migration/migrators.py", line 206, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations)
  File "/home/bryan/.local/lib/python2.6/site-packages/south/migration/migrators.py", line 275, in migrate_many
  File "/home/bryan/.local/lib/python2.6/site-packages/south/db/generic.py", line 678, in send_pending_create_signals
    self.really_send_create_signal(app_label, list(set(model_names)))
  File "/home/bryan/.local/lib/python2.6/site-packages/south/db/generic.py", line 720, in really_send_create_signal
    verbosity=verbosity, interactive=interactive)
  File "/home/bryan/.local/lib/python2.6/site-packages/django/dispatch/dispatcher.py", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/bryan/.local/lib/python2.6/site-packages/django/contrib/contenttypes/management.py", line 10, in update_contenttypes
    db = kwargs['db']
KeyError: 'db'

Let me know if I should divulge anything else.

Change History

comment:1 Changed 6 years ago by andrew

  • Status changed from new to assigned

The 0.7 branch isn't really stable yet, but I'll keep this around to ensure it's one of the many things that get fixed!

(GenericRelations are always a headache)

comment:2 Changed 6 years ago by anonymous

FYI I just tried the latest south from bitbucket with django 1.2-alpha. Same problem as above.

Reverting back to 0.6.2 and django 1.1.1 :(

Yes it's about the Generic Relations else multidb works with latest south.


comment:3 Changed 6 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.