I am currently attempting an install of osqa on my Ubuntu box and with xatrix's help have got manage.py to run.

Now it complains (output below) that django.db can't import name connections, but builds the database anyway:

# python manage.py syncdb --all
Syncing...
Traceback (most recent call last):
  File "manage.py", line 13, in <module>
    execute_manager(settings)
  File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py", line 362, in execute_manager
    utility.execute()
  File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py", line 303, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.6/dist-packages/South-0.7.3-py2.6.egg/south/management/commands/syncdb.py", line 90, in handle_noargs
    syncdb.Command().execute(**options)
  File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/usr/lib/pymodules/python2.6/django/core/management/commands/syncdb.py", line 99, in handle_noargs
    emit_post_sync_signal(created_models, verbosity, interactive)
  File "/usr/lib/pymodules/python2.6/django/core/management/sql.py", line 205, in emit_post_sync_signal
    interactive=interactive)
  File "/usr/lib/pymodules/python2.6/django/dispatch/dispatcher.py", line 166, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/src/osqa_svn/forum/management/__init__.py", line 11, in post_syncdb_callback
    from django.db import connection, connections
ImportError: cannot import name connections

Is this failure significant? and how can it be resolved?

Going on to 'python manage.py migrate forum --fake' seems to work.

asked 08 Mar '11, 17:32

OtmasDaf's gravatar image

OtmasDaf
16224
accept rate: 0%

edited 08 Mar '11, 17:58


That's caused by having python-django 1.1 installed. django.db.connections is new in 1.2. (Thanks to http://www.bitchx.com/log/django-f/django-f-10-Feb-2010/django-f-10-Feb-2010-11.php for the insight.)

Run:

dpkg -l '*django*'

to confirm that you have 1.1. Either upgrade to Maverick which has 1.2 or follow the advice in Ubuntu with Apache and MySQL to install latest django yourself.

link
This answer is marked "community wiki".

answered 29 Mar '11, 18:57

cben's gravatar image

cben
11
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×156
×45
×23

Asked: 08 Mar '11, 17:32

Seen: 1,237 times

Last updated: 29 Mar '11, 18:57

powered by OSQA