ImportError: No module named exceptions

user3162432 picture user3162432 · Jan 5, 2014 · Viewed 8.3k times · Source

i'm trying to install kitsune in the ubuntu terminal. I am not able to initialize the database. When i give the command ./manage.py syncdb --migrate , i get the following error

Error: Tried importing 'settings_local.py' and 'settings.py' but neither could be found (or they're throwing an ImportError). Please come back and try again later.Traceback (most recent call last):

  File "./manage.py", line 30, in <module>
    from kitsune import settings  # Assumed to be in the same directory.
  File "/home/user/kitsune/kitsune/settings.py", line 740, in <module>
    import djcelery
  File "/usr/local/lib/python2.7/dist-packages/djcelery/__init__.py", line 22, in <module>
    from celery import current_app as celery  # noqa
  File "/usr/local/lib/python2.7/dist-packages/celery/five.py", line 307, in __getattr__
    module = __import__(self._object_origins[name], None, None, [name])
  File "/usr/local/lib/python2.7/dist-packages/celery/_state.py", line 20, in <module>
    from celery.utils.threads import LocalStack
  File "/usr/local/lib/python2.7/dist-packages/celery/utils/__init__.py", line 24, in 
<module>
    from celery.exceptions import CPendingDeprecationWarning, CDeprecationWarning
  File "/usr/local/lib/python2.7/dist-packages/celery/exceptions.py", line 13, in <module>
    from billiard.exceptions import (  # noqa

ImportError: No module named exceptions 

I can't find the exceptions file in billiard. How do I fix this error?

Answer

chinglun picture chinglun · Oct 1, 2014

I had this error with fabric. The error message was the same:

ImportError: No module named exceptions

It turned out to be my fabric was out of date. The error was resolved by upgrading fabric to the latest version (1.10) with:

$ sudo pip install fabric --upgrade

For your information, I am running Ubuntu 12.04 64-bit with Python 2.7.3