First time here? Check out the FAQ!
0

ImportError: cannot import name signals

Hi Guys,

I'm trying to install askbot in alwaysdata but when I type

python manage.py syncdb

I have the following error

    /usr/local/alwaysdata/python/django/1.4/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
/usr/local/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet
/usr/local/alwaysdata/python/django/1.4/django/core/cache/__init__.py:82: DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead.
  DeprecationWarning
cannot import name open_if_exists
cannot import name signals
Traceback (most recent call last):
  File "manage.py", line 12, in <module>
    execute_manager(settings)
  File "/usr/local/alwaysdata/python/django/1.4/django/core/management/__init__.py", line 459, in execute_manager
    utility.execute()
  File "/usr/local/alwaysdata/python/django/1.4/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/alwaysdata/python/django/1.4/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/alwaysdata/python/django/1.4/django/core/management/base.py", line 231, in execute
    self.validate()
  File "/usr/local/alwaysdata/python/django/1.4/django/core/management/base.py", line 266, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/local/alwaysdata/python/django/1.4/django/core/management/validation.py", line 30, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/local/alwaysdata/python/django/1.4/django/db/models/loading.py", line 158, in get_app_errors
    self._populate()
  File "/usr/local/alwaysdata/python/django/1.4/django/db/models/loading.py", line 67, in _populate
    self.load_app(app_name)
  File "/usr/local/alwaysdata/python/django/1.4/django/db/models/loading.py", line 88, in load_app
    models = import_module('.models', app_name)
  File "/usr/local/alwaysdata/python/django/1.4/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/nfs/http7/mispruebas/django_site/askbot/models/__init__.py", line 25, in <module>
    from askbot.models.question import Thread
  File "/nfs/http7/mispruebas/django_site/askbot/models/question.py", line 18, in <module>
    from askbot.models import signals
ImportError: cannot import name signals

How I could solve it?

Thanks :)

sciruela's avatar
11
sciruela
asked 2012-04-21 14:33:11 -0600, updated 2012-04-21 14:33:50 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

I would insert a line

import pdb; pdb.set_trace()

at the beginning of askbot/models/signals.py, then step with the debugger (start application in the shell then type n into the debugger input).

There must be a failing import inside which is masked by the django application loading code.

Evgeny's avatar
13.2k
Evgeny
answered 2012-04-21 14:42:20 -0600, updated 2012-04-21 14:42:45 -0600
edit flag offensive 0 remove flag delete link

Comments

The problem is the following import "from askbot.models import signals". So, any Idea about this problem? I use the free account of alwaysdata and I had to load dynamically of the dependencies using sys.path.append().

sciruela's avatar sciruela (2012-04-22 06:09:35 -0600) edit
add a comment see more comments