Question

I am trying to run test project of django-orbited. When I execute python manage.py runserver, the following error occurs:

Unhandled exception in thread started by <bound method Command.inner_run of 
<django.core.management.commands.runserver.Command object at 0x8ea994c>>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 92, in inner_run
    self.validate(display_num_errors=True)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 280, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/validation.py", line 35, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 166, in get_app_errors
    self._populate()
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 75, in _populate
    self.load_app(app_name)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/loading.py", line 96, in load_app
    models = import_module('.models', app_name)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/prashant/grambox/django-orbited/testing/django_orbited/models.py", line 2, in <module>
    from pyorbited.simple import Client as OrbitedClient
ImportError: No module named pyorbited.simple

I have installed orbited using command pip install orbited. I tried changing pyorbited.simple to orbited.simple, but the error persists. Does anyone have any idea how to solve it?

Value in sys.path:

/usr/local/lib/python2.7/dist-packages/pip-1.2.1-py2.7.egg
/usr/local/lib/python2.7/dist-packages/jqmobile-1.0_pre_alpha-py2.7.egg
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PIL
/usr/lib/python2.7/dist-packages/gst-0.10
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
/usr/lib/python2.7/dist-packages/ubuntuone-client
/usr/lib/python2.7/dist-packages/ubuntuone-control-panel
/usr/lib/python2.7/dist-packages/ubuntuone-couch
/usr/lib/python2.7/dist-packages/ubuntuone-installer
/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode
Was it helpful?

Solution

You installed orbited but you need to install pyorbited.

I can reproduce the same issue with only orbited installed:

% sudo pip install orbited
% python
>>> import orbited        # yes, this works but it's not what you need
>>> from pyorbited.simple import Client as OrbitedClient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pyorbited.simple

On the other hand, once we install pyorbited, it works:

% sudo pip install pyorbited
% python
>>> from pyorbited.simple import Client as OrbitedClient
>>>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top