ImportError: No module named exceptions

8.8k views Asked by At

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?

3

There are 3 answers

3
archetipo On

Exceptions should be a python file in a directory called billiard, for example, you create a file called exceptions.py and add the classes and methods that you need .. this can work around the problem.

0
chinglun On

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

1
user920391 On

You should follow kitsune installation process described in http://kitsune.readthedocs.org/en/latest/hacking_howto.html There is a link to separate chapter on vendor-packages http://kitsune.readthedocs.org/en/latest/vendor.html#vendor-chapter. You should install all the vendor packages needed by kitsune including billiard and celery (your errors).