3

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?

Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97

3 Answers3

1

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

chinglun
  • 637
  • 5
  • 18
0

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.

archetipo
  • 579
  • 4
  • 10
  • I created a file called exceptions.py in the directory called billiard. Now I get the error - from billiard.exceptions import ( # noqa ImportError: cannot import name SoftTimeLimitExceeded –  Jan 05 '14 at 15:34
  • This error means that the app search method SoftTimeLimitExceeded. surely you are missing it in the file exceptions.py with the various parts that compose ... in fact it is not enough because then you would add SoftTimeLimitExceeded erreri execution of the method .. I suggest, if you've downloaded the app python, to search for the original file and replace it exceptions.py that you have created. – archetipo Jan 05 '14 at 17:35
  • another way is to try https://github.com/mozilla/kitsune/blob/master/vendor/packages/billiard/INSTALL – archetipo Jan 05 '14 at 17:57
0

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).

user920391
  • 598
  • 7
  • 8
  • It seemed that I hadn't cloned the kitsune module completely from the source. I ran the following command: "git clone --recursive git://github.com/mozilla/kitsune.git" once again and it worked. –  May 06 '14 at 14:30